2008-01-06 Luca Bruno <lethalman88@gmail.com>
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Jan 2008 10:57:17 +0000 (10:57 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Jan 2008 10:57:17 +0000 (10:57 +0000)
        Reviewed by Alp Toker.

        Remove curl handles immediately if the timer is not running.

        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::cancel):

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

WebCore/ChangeLog
WebCore/platform/network/curl/ResourceHandleManager.cpp

index f0ec9a36acfcffb99e0018223ce0b9fc60e6e98b..e09fa7505aa72b79ffee8dd81b74b0424f2efa1d 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-06  Luca Bruno  <lethalman88@gmail.com>
+
+        Reviewed by Alp Toker.
+
+        Remove curl handles immediately if the timer is not running.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::cancel):
+
 2008-01-06  Alp Toker  <alp@atoker.com>
 
         Reviewed by Eric.
index de68f3166cf16c0ec2a8cf5704fa5a85ee7a48bd..456c6dbc3f4bda3b52f973df51d4cce0fbe6f388 100644 (file)
@@ -514,10 +514,12 @@ void ResourceHandleManager::cancel(ResourceHandle* job)
 {
     if (removeScheduledJob(job))
         return;
-    ResourceHandleInternal* d = job->getInternal();
-    d->m_cancelled = true;
-    if (!m_downloadTimer.isActive())
-        m_downloadTimer.startOneShot(pollTimeSeconds);
+
+    if (m_downloadTimer.isActive()) {
+        ResourceHandleInternal* d = job->getInternal();
+        d->m_cancelled = true;
+    } else
+        removeFromCurl(job);
 }
 
 } // namespace WebCore