Holger Hans Peter Freyther <zecke@selfish.org>
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2008 10:49:20 +0000 (10:49 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2008 10:49:20 +0000 (10:49 +0000)
networking: Use Qt::QueuedConnection in QNetworkReplyHandler

    Make sure we leave the networking backend before calling
    into WebCore. Otheriwse we might return to the networking
    backend when it is already deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/qt/QNetworkReplyHandler.cpp

index f910409..d1d4934 100644 (file)
@@ -1,3 +1,17 @@
+2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
+
+        Reviewed by Simon.
+
+        networking: Use Qt::QueuedConnection in QNetworkReplyHandler
+
+        Make sure we leave the networking backend before calling
+        into WebCore. Otheriwse we might return to the networking
+        backend when it is already deleted.
+
+        * platform/network/qt/QNetworkReplyHandler.cpp:
+        (WebCore::FormDataIODevice::setParent):
+        (WebCore::QNetworkReplyHandler::start):
+
 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
 
         Reviewed by Simon.
index 765a442..b5684d4 100644 (file)
@@ -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);
 }
 
 }