[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:01:53 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e4677571cf0f3c9b405610466e88a471de238774
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 1 17:29:18 2010 +0000
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=44406
<rdar://problem/8310921> Application Cache crash when a fallback document has a manifest URL
Test: http/tests/appcache/foreign-fallback.html
* loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache):
Changed ApplicationCacheResource lookup to find fallback resources correctly.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 188170a..6f3e917 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-01 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44406
+ <rdar://problem/8310921> Application Cache crash when a fallback document has a manifest URL
+
+ * http/tests/appcache/foreign-fallback-expected.txt: Added.
+ * http/tests/appcache/foreign-fallback.html: Added.
+ * http/tests/appcache/resources/foreign-fallback-fallback.html: Added.
+ * http/tests/appcache/resources/foreign-fallback.manifest: Added.
+
2010-10-01 Adam Roben <aroben at apple.com>
Support for testing NPN_GetValue(NPNVnetscapeWindow)
diff --git a/LayoutTests/http/tests/appcache/foreign-fallback-expected.txt b/LayoutTests/http/tests/appcache/foreign-fallback-expected.txt
new file mode 100644
index 0000000..dded924
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/foreign-fallback-expected.txt
@@ -0,0 +1,6 @@
+Test for bug 44406: Application Cache crash when a fallback document has a manifest URL.
+
+PASS
+The frame below should display a Not Found error - the fallback entry is foreign, so it shouldn't be used for main resource.
+
+
diff --git a/LayoutTests/http/tests/appcache/foreign-fallback.html b/LayoutTests/http/tests/appcache/foreign-fallback.html
new file mode 100644
index 0000000..7a80046
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/foreign-fallback.html
@@ -0,0 +1,48 @@
+<html manifest="resources/foreign-fallback.manifest">
+<body>
+<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=44406">bug 44406</a>:
+Application Cache crash when a fallback document has a manifest URL.</p>
+<div id="result">Testing...</div>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+}
+
+
+applicationCache.addEventListener('cached', test, false);
+applicationCache.addEventListener('noupdate', test, false);
+
+function test()
+{
+ var ifr = document.createElement("iframe");
+ ifr.setAttribute("src", "resources/foreign-fallback/does-not-exist.html");
+ document.body.appendChild(ifr);
+
+ // I couldn't find any event that would fire on frame loading failure, so let's poll.
+ setTimeout(frameDone, 100);
+}
+
+function frameDone()
+{
+ try {
+ var frameContent = frames[0].document.documentElement.innerHTML;
+ if (frameContent.match("Not Found"))
+ document.getElementById("result").innerHTML = "PASS";
+ else if (frameContent.match("FAIL"))
+ document.getElementById("result").innerHTML = "FAIL";
+ else
+ throw "Try again";
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ } catch (ex) {
+ // Not done yet.
+ setTimeout(frameDone, 100);
+ }
+}
+
+</script>
+<p>The frame below should display a Not Found error - the fallback entry is foreign, so it shouldn't be used for main resource.</p>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/appcache/resources/foreign-fallback-fallback.html b/LayoutTests/http/tests/appcache/resources/foreign-fallback-fallback.html
new file mode 100644
index 0000000..9996bf6
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/resources/foreign-fallback-fallback.html
@@ -0,0 +1,2 @@
+<html manifest="foobar.manifest">
+FAIL
diff --git a/LayoutTests/http/tests/appcache/resources/foreign-fallback.manifest b/LayoutTests/http/tests/appcache/resources/foreign-fallback.manifest
new file mode 100644
index 0000000..ddaf602
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/resources/foreign-fallback.manifest
@@ -0,0 +1,4 @@
+CACHE MANIFEST
+
+FALLBACK:
+/appcache/resources/foreign-fallback/ foreign-fallback-fallback.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 01896d2..a65ff41 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-01 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44406
+ <rdar://problem/8310921> Application Cache crash when a fallback document has a manifest URL
+
+ Test: http/tests/appcache/foreign-fallback.html
+
+ * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache):
+ Changed ApplicationCacheResource lookup to find fallback resources correctly.
+
2010-10-01 Kwang Yul Seo <skyul at company100.net>
Unreviewed, Brew MP build fix.
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index d89f819..82f2a0a 100644
--- a/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -163,10 +163,10 @@ void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifest
mainResourceCache->group()->update(frame, ApplicationCacheUpdateWithBrowsingContext);
} else {
// The main resource was loaded from cache, so the cache must have an entry for it. Mark it as foreign.
- KURL documentURL(documentLoader->url());
- if (documentURL.hasFragmentIdentifier())
- documentURL.removeFragmentIdentifier();
- ApplicationCacheResource* resource = mainResourceCache->resourceForURL(documentURL);
+ KURL resourceURL(documentLoader->responseURL());
+ if (resourceURL.hasFragmentIdentifier())
+ resourceURL.removeFragmentIdentifier();
+ ApplicationCacheResource* resource = mainResourceCache->resourceForURL(resourceURL);
bool inStorage = resource->storageID();
resource->addType(ApplicationCacheResource::Foreign);
if (inStorage)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list