* Use the JobStatus to make sure to not deliver finished/data before the job has...
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2007 13:41:16 +0000 (13:41 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2007 13:41:16 +0000 (13:41 +0000)
* We have no idea if any data will come so we can still finish and then get pending data. This luckily can't happen for the local file case.

Signed-off-by: Simon Hausmann <hausmann@kde.org>
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/Api/qwebnetworkinterface.cpp
WebKit/qt/ChangeLog

index 8839ef7845361c678849dd8b98ca78457bf17e0e..9414e63d77c143e099e97e38cb2370f61d4d03b9 100644 (file)
@@ -801,6 +801,10 @@ void QWebNetworkManager::doWork()
         if (hasSyncJobs && !syncJobs.contains(jobData->job))
             continue;
 
+        // This job was not yet started
+        if (static_cast<int>(jobData->job->status()) < QWebNetworkJob::JobStarted)
+            continue;
+
         m_queueMutex.lock();
         m_receivedData.removeAll(jobData);
         m_queueMutex.unlock();
@@ -814,6 +818,10 @@ void QWebNetworkManager::doWork()
         if (hasSyncJobs && !syncJobs.contains(jobFinished->job))
             continue;
 
+        // This job was not yet started... we have no idea if data comes by...
+        if (static_cast<int>(jobFinished->job->status()) < QWebNetworkJob::JobStarted)
+            continue;
+
         m_queueMutex.lock();
         m_finishedJobs.removeAll(jobFinished);
         m_queueMutex.unlock();
index 48bea507bed87a2a0bffea1e4893a8a966ed18a7..148a75e81f97f4fb98ce7e88f2d5c5ba44bc552e 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-25  Holger Freyther  <zecke@selfish.org>
+
+        Reviewed by Simon Hausmann <hausmann@kde.org>.
+
+        * Use the JobStatus to make sure to not deliver finished/data before the job has started. This is the case with the fast/dom/onerror-img.html test case.
+        * We have no idea if any data will come so we can still finish and then get pending data. This luckily can't happen for the local file case.
+        
+
+        * Api/qwebnetworkinterface.cpp:
+        (QWebNetworkManager::doWork):
+
 2007-10-25  Holger Freyther  <zecke@selfish.org>
 
         Reviewed by Simon Hausmann <hausmann@kde.org>.