[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ap at apple.com ap at apple.com
Wed Dec 22 14:41:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 97766d85eb93636a0146295633ca1107a1601b1a
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 15 22:12:43 2010 +0000

            Reviewed by Darin Adler.
    
            https://bugs.webkit.org/show_bug.cgi?id=47736
            <rdar://problem/8429396> WebCore cache gets corrupted if revalidation request starts at a wrong time
    
            Test: http/tests/cache/stopped-revalidation.html
    
            * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): Copied logic for
            revalidation requests from didFail().
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69887 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index fbc808d..8486272 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-15  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=47736
+        <rdar://problem/8429396> WebCore cache gets corrupted if revalidation request starts at a wrong time
+
+        * http/tests/cache/resources/.htaccess: Added.
+        * http/tests/cache/resources/compass-no-cache.jpg: Added.
+        Added a version of the image that's served with no-cache, forcing revalidation on each access.
+
+        * http/tests/cache/resources/stopped-revalidation-result.html: Added.
+        * http/tests/cache/stopped-revalidation-expected.txt: Added.
+        * http/tests/cache/stopped-revalidation.html: Added.
+
 2010-10-15  Nate Chapin  <japhet at chromium.org>
 
         Unreviewed, Chromium expectations update.
diff --git a/LayoutTests/http/tests/cache/resources/.htaccess b/LayoutTests/http/tests/cache/resources/.htaccess
new file mode 100644
index 0000000..42b9ba9
--- /dev/null
+++ b/LayoutTests/http/tests/cache/resources/.htaccess
@@ -0,0 +1,4 @@
+<Files "compass-no-cache.jpg">
+Header set Cache-Control "no-cache, must-revalidate"
+Header set Pragma no-cache
+</Files>
diff --git a/LayoutTests/http/tests/cache/resources/stopped-revalidation-result.html b/LayoutTests/http/tests/cache/resources/stopped-revalidation-result.html
new file mode 100644
index 0000000..79df498
--- /dev/null
+++ b/LayoutTests/http/tests/cache/resources/stopped-revalidation-result.html
@@ -0,0 +1,12 @@
+<body>
+<div id="result">Testing...</div>
+<img src="compass-no-cache.jpg" onload="done()">
+<script>
+function done() {
+    var img = document.getElementsByTagName("img")[0];
+    var result = document.getElementById("result");
+    result.innerHTML = img.width == 128 ? "PASS" : "FAIL - image not loaded";
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+</script>
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt b/LayoutTests/http/tests/cache/stopped-revalidation-expected.txt
similarity index 100%
copy from LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt
copy to LayoutTests/http/tests/cache/stopped-revalidation-expected.txt
diff --git a/LayoutTests/http/tests/cache/stopped-revalidation.html b/LayoutTests/http/tests/cache/stopped-revalidation.html
new file mode 100644
index 0000000..46cc7a2
--- /dev/null
+++ b/LayoutTests/http/tests/cache/stopped-revalidation.html
@@ -0,0 +1,33 @@
+<body>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function setNetworkEnabled(state)
+{
+    var req = new XMLHttpRequest;
+    req.open("GET", "/resources/network-simulator.php?command=" + (state ? "connect" : "disconnect"), false);
+    req.send("");
+}
+
+setNetworkEnabled(true);
+
+function test()
+{
+    location='resources/stopped-revalidation-result.html';
+
+    setTimeout(function() {
+        var img = document.getElementsByTagName("img")[0];
+        document.body.removeChild(img);
+        img = document.createElement("img");
+        img.style.display = "none";
+        img.src = "resources/compass-no-cache.jpg";
+        document.body.appendChild(img);
+        img.style.display = "inline";
+    }, 0);
+}
+</script>
+<img src="resources/compass-no-cache.jpg" onload="test()">
+</body>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6698104..2c3184e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,17 @@
 2010-10-15  Alexey Proskuryakov  <ap at apple.com>
 
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=47736
+        <rdar://problem/8429396> WebCore cache gets corrupted if revalidation request starts at a wrong time
+
+        Test: http/tests/cache/stopped-revalidation.html
+
+        * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): Copied logic for
+        revalidation requests from didFail().
+
+2010-10-15  Alexey Proskuryakov  <ap at apple.com>
+
         Reviewed by Darin Adler in <https://bugs.webkit.org/show_bug.cgi?id=47736>.
 
         Add a logging channel for WebCore cache and resource loading.
diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp
index 81e91eb..a466d5a 100644
--- a/WebCore/loader/loader.cpp
+++ b/WebCore/loader/loader.cpp
@@ -383,6 +383,8 @@ void Loader::Host::servePendingRequests(RequestQueue& requestsPending, bool& ser
             CachedResource* resource = request->cachedResource();
             cachedResourceLoader->decrementRequestCount(resource);
             cachedResourceLoader->setLoadInProgress(true);
+            if (resource->resourceToRevalidate())
+                cache()->revalidationFailed(resource);
             resource->error();
             cachedResourceLoader->setLoadInProgress(false);
             delete request;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list