Unreviewed, rolling out r114965.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 01:25:43 +0000 (01:25 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 01:25:43 +0000 (01:25 +0000)
http://trac.webkit.org/changeset/114965
https://bugs.webkit.org/show_bug.cgi?id=84665

Four new resource load delegate test failures (Requested by
jernoble on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-04-23

Source/WebCore:

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
(WebCore::SubresourceLoader::releaseResources):

LayoutTests:

* http/tests/cache/cancel-during-failure-crash-expected.txt: Removed.
* http/tests/cache/cancel-during-failure-crash.html: Removed.
* platform/chromium-mac/security/block-test-expected.txt:
* platform/chromium-win/security/block-test-expected.txt:
* platform/gtk/security/block-test-expected.txt:
* platform/mac/security/block-test-expected.txt:

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

LayoutTests/ChangeLog
LayoutTests/http/tests/cache/cancel-during-failure-crash-expected.txt [deleted file]
LayoutTests/http/tests/cache/cancel-during-failure-crash.html [deleted file]
LayoutTests/platform/chromium-mac/security/block-test-expected.txt
LayoutTests/platform/chromium-win/security/block-test-expected.txt
LayoutTests/platform/gtk/security/block-test-expected.txt
LayoutTests/platform/mac/security/block-test-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/loader/SubresourceLoader.cpp

index 9163816..62047d4 100644 (file)
@@ -1,3 +1,19 @@
+2012-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r114965.
+        http://trac.webkit.org/changeset/114965
+        https://bugs.webkit.org/show_bug.cgi?id=84665
+
+        Four new resource load delegate test failures (Requested by
+        jernoble on #webkit).
+
+        * http/tests/cache/cancel-during-failure-crash-expected.txt: Removed.
+        * http/tests/cache/cancel-during-failure-crash.html: Removed.
+        * platform/chromium-mac/security/block-test-expected.txt:
+        * platform/chromium-win/security/block-test-expected.txt:
+        * platform/gtk/security/block-test-expected.txt:
+        * platform/mac/security/block-test-expected.txt:
+
 2012-04-23  Beth Dakin  <bdakin@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=84649
diff --git a/LayoutTests/http/tests/cache/cancel-during-failure-crash-expected.txt b/LayoutTests/http/tests/cache/cancel-during-failure-crash-expected.txt
deleted file mode 100644 (file)
index 7ef22e9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PASS
diff --git a/LayoutTests/http/tests/cache/cancel-during-failure-crash.html b/LayoutTests/http/tests/cache/cancel-during-failure-crash.html
deleted file mode 100644 (file)
index 226dfe8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
-<body>
-<script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-}
-
-var img = new Image();
-img.onerror = function() {
-    // cancel resource load within didFail()
-    window.stop();
-    document.body.appendChild(document.createTextNode("PASS"));
-    layoutTestController.notifyDone();
-}
-
-// Port 7 will likely refuse the connection, causing a didFail()
-// from the network stack.
-img.src = "http://localhost:7";
-</script>
-</body>
-</html>
index ef6dc52..820e7fd 100644 (file)
@@ -1,7 +1,7 @@
 http://255.255.255.255:1/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:1/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 <unknown> - didFinishLoading
-http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:1/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:1/test.jpg">
+http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:7/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:7/test.jpg">
 http://255.255.255.255:9/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:9/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:9/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:9/test.jpg">
index ebdc2b2..9cacbce 100644 (file)
@@ -1,7 +1,7 @@
 http://255.255.255.255:1/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:1/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 <unknown> - didFinishLoading
-http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:1/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:1/test.jpg">
+http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:7/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:7/test.jpg">
 http://255.255.255.255:9/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:9/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:9/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:9/test.jpg">
index 5483ea4..7dbd297 100644 (file)
@@ -1,7 +1,7 @@
 http://255.255.255.255:1/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:1/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 <unknown> - didFinishLoading
-http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:1/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:1/test.jpg">
+http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:7/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:7/test.jpg">
 http://255.255.255.255:9/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:9/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:9/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:9/test.jpg">
index 1197e45..296c4ba 100644 (file)
@@ -1,7 +1,7 @@
 http://255.255.255.255:1/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:1/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 <unknown> - didFinishLoading
-http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:1/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:1/test.jpg">
+http://255.255.255.255:7/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:7/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:7/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:7/test.jpg">
 http://255.255.255.255:9/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:9/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null)
 http://255.255.255.255:9/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:9/test.jpg">
index 6664d4d..46765e0 100644 (file)
@@ -1,3 +1,18 @@
+2012-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r114965.
+        http://trac.webkit.org/changeset/114965
+        https://bugs.webkit.org/show_bug.cgi?id=84665
+
+        Four new resource load delegate test failures (Requested by
+        jernoble on #webkit).
+
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::didFinishLoading):
+        (WebCore::SubresourceLoader::didFail):
+        (WebCore::SubresourceLoader::willCancel):
+        (WebCore::SubresourceLoader::releaseResources):
+
 2012-04-23  Beth Dakin  <bdakin@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=84649
index feb6e8d..76583e8 100644 (file)
@@ -275,10 +275,6 @@ void SubresourceLoader::didFinishLoading(double finishTime)
     m_resource->setLoadFinishTime(finishTime);
     m_resource->data(resourceData(), true);
     m_resource->finish();
-    m_requestCountTracker.clear();
-    if (reachedTerminalState())
-        return;
-    m_document->cachedResourceLoader()->loadDone();
     ResourceLoader::didFinishLoading(finishTime);
 }
 
@@ -296,35 +292,31 @@ void SubresourceLoader::didFail(const ResourceError& error)
     m_resource->error(CachedResource::LoadError);
     if (!m_resource->isPreloaded())
         memoryCache()->remove(m_resource);
-    m_requestCountTracker.clear();
-    if (reachedTerminalState())
-        return;
-    m_document->cachedResourceLoader()->loadDone();
     ResourceLoader::didFail(error);
 }
 
 void SubresourceLoader::willCancel(const ResourceError&)
 {
-    if (m_state == Uninitialized)
-         return;
-    if (m_state == Initialized) {
-        ASSERT(!reachedTerminalState());
-        LOG(ResourceLoading, "Cancelled load of '%s'.\n", m_resource->url().string().latin1().data());
-
-        RefPtr<SubresourceLoader> protect(this);
-        m_state = Finishing;
-        if (m_resource->resourceToRevalidate())
-            memoryCache()->revalidationFailed(m_resource);
-        memoryCache()->remove(m_resource);
-    }
-    m_requestCountTracker.clear();
-    m_document->cachedResourceLoader()->loadDone();
+    if (m_state != Initialized)
+        return;
+    ASSERT(!reachedTerminalState());
+    LOG(ResourceLoading, "Cancelled load of '%s'.\n", m_resource->url().string().latin1().data());
+
+    RefPtr<SubresourceLoader> protect(this);
+    m_state = Finishing;
+    if (m_resource->resourceToRevalidate())
+        memoryCache()->revalidationFailed(m_resource);
+    memoryCache()->remove(m_resource);
 }
 
 void SubresourceLoader::releaseResources()
 {
     ASSERT(!reachedTerminalState());
     if (m_state != Uninitialized) {
+        m_requestCountTracker.clear();
+        m_document->cachedResourceLoader()->loadDone();
+        if (reachedTerminalState())
+            return;
         m_resource->stopLoading();
         m_documentLoader->removeSubresourceLoader(this);
     }