[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035

Reviewed by Simon Hausmann.

Source/WebCore:

Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
  Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
(WebCore::QNetworkReplyWrapper::release):

Source/WebKit/qt:

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::networkReplyParentChanged):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4 files changed