Title: [138012] trunk/Source/WebCore
Revision
138012
Author
[email protected]
Date
2012-12-18 05:04:51 -0800 (Tue, 18 Dec 2012)

Log Message

REGRESSION (r137607): Cannot download files, stuck in “Preparing to download”
https://bugs.webkit.org/show_bug.cgi?id=105044

Reviewed by Antti Koivisto.

The work done by DocumentLoader::mainReceivedError() changed subtly in r137607,
such that it cancels the ResourceHandle. We want to treat switching to a download
like a failure, where WebCore assumes that the load is finished, and no
cancellation is required.

No new tests, tested manually by verifying that downloading files works in
Safari Mac.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterContentPolicy):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::cancel): Remove the workaround added in r137763.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138011 => 138012)


--- trunk/Source/WebCore/ChangeLog	2012-12-18 12:57:16 UTC (rev 138011)
+++ trunk/Source/WebCore/ChangeLog	2012-12-18 13:04:51 UTC (rev 138012)
@@ -1,3 +1,23 @@
+2012-12-18  Nate Chapin  <[email protected]>
+
+        REGRESSION (r137607): Cannot download files, stuck in “Preparing to download”
+        https://bugs.webkit.org/show_bug.cgi?id=105044
+
+        Reviewed by Antti Koivisto.
+
+        The work done by DocumentLoader::mainReceivedError() changed subtly in r137607,
+        such that it cancels the ResourceHandle. We want to treat switching to a download
+        like a failure, where WebCore assumes that the load is finished, and no
+        cancellation is required.
+
+        No new tests, tested manually by verifying that downloading files works in
+        Safari Mac.
+
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::continueAfterContentPolicy):
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::cancel): Remove the workaround added in r137763.
+
 2012-12-18  Eugene Klyuchnikov  <[email protected]>
 
         Web Inspector: [Network] Ordering of cookies displayed is nondeterministic.

Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (138011 => 138012)


--- trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-12-18 12:57:16 UTC (rev 138011)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-12-18 13:04:51 UTC (rev 138012)
@@ -319,8 +319,8 @@
         frameLoader()->client()->convertMainResourceLoadToDownload(this, request, r);
 
         // It might have gone missing
-        if (frameLoader())
-            receivedError(interruptedForPolicyChangeError());
+        if (loader())
+            loader()->didFail(interruptedForPolicyChangeError());
         return;
     }
     case PolicyIgnore:

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


--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2012-12-18 12:57:16 UTC (rev 138011)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2012-12-18 13:04:51 UTC (rev 138012)
@@ -288,12 +288,6 @@
 {
     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