On Monday 31 March 2008 18:30:44 Bernhard Rosenkränzer wrote:
> Pointing the QtWebKit demo browser at the attached file (if the file is on
> the local filesystem; getting the same file through http works) causes it
> to crash.
Yup. And this is evil, makes men and women cry, makes me want to have
refcounting for QObjects and the reason is probably similar to the crashes I
see when opening the xmlhttprequest layout tests from 'file'.
You might want to try the below patch and see if this band aid helps.
z.
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 765a442..b5684d4 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -115,7 +115,7 @@ void FormDataIODevice::setParent(QNetworkReply* reply)
{
QIODevice::setParent(reply);
- connect(reply, SIGNAL(finished()), SLOT(slotFinished()));
+ connect(reply, SIGNAL(finished()), SLOT(slotFinished()), Qt::QueuedConnection);
}
bool FormDataIODevice::isSequential() const
@@ -356,16 +356,16 @@ void QNetworkReplyHandler::start()
m_reply->setParent(this);
connect(m_reply, SIGNAL(finished()),
- this, SLOT(finish()));
+ this, SLOT(finish()), Qt::QueuedConnection);
// For http(s) we know that the headers are complete upon metaDataChanged() emission, so we
// can send the response as early as possible
if (scheme == QLatin1String("http") || scheme == QLatin1String("https"))
connect(m_reply, SIGNAL(metaDataChanged()),
- this, SLOT(sendResponseIfNeeded()));
+ this, SLOT(sendResponseIfNeeded()), Qt::QueuedConnection);
connect(m_reply, SIGNAL(readyRead()),
- this, SLOT(forwardData()));
+ this, SLOT(forwardData()), Qt::QueuedConnection);
}
}