Title: [137763] trunk/Source/WebCore
Revision
137763
Author
[email protected]
Date
2012-12-14 12:49:09 -0800 (Fri, 14 Dec 2012)

Log Message

REGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
https://bugs.webkit.org/show_bug.cgi?id=105044
<rdar://problem/12879657>

Reviewed by Alexey Proskuryakov.

Make ResourceHandle::cancel return early if the handle has been converted to a download.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::cancel):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (137762 => 137763)


--- trunk/Source/WebCore/ChangeLog	2012-12-14 20:27:36 UTC (rev 137762)
+++ trunk/Source/WebCore/ChangeLog	2012-12-14 20:49:09 UTC (rev 137763)
@@ -1,3 +1,16 @@
+2012-12-14  Anders Carlsson  <[email protected]>
+
+        REGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
+        https://bugs.webkit.org/show_bug.cgi?id=105044
+        <rdar://problem/12879657>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Make ResourceHandle::cancel return early if the handle has been converted to a download.
+
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::cancel):
+
 2012-12-14  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r137570.

Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (137762 => 137763)


--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2012-12-14 20:27:36 UTC (rev 137762)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2012-12-14 20:49:09 UTC (rev 137763)
@@ -288,6 +288,12 @@
 {
     LOG(Network, "Handle %p cancel connection %p", this, d->m_connection.get());
 
+    if (!d->m_proxy) {
+        // If the proxy is null, the connection has been handed off to NSURLDownload, so ResourceHandle should not cancel it.
+        // FIXME: We should do what we do in the CFNetwork port and null out the NSURLConnection object instead.
+        return;
+    }
+
     // Leaks were seen on HTTP tests without this; can be removed once <rdar://problem/6886937> is fixed.
     if (d->m_currentMacChallenge)
         [[d->m_currentMacChallenge sender] cancelAuthenticationChallenge:d->m_currentMacChallenge];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to