Commit 93990f86 authored by oliver's avatar oliver

2007-03-27 Oliver Hunt <oliver@apple.com>

        Reviewed by Maciej.

        The WebArchiver needs all the subresources of a document to be accessible
        through the DocLoader, so we can't remove a CachedResource simultaneously
        from the global Cache and all DocLoaders, just because it needs to be 
        reloaded in one.

        Fixes rdar://problem/5044366

        * loader/Cache.cpp:
        (WebCore::Cache::remove):
           Don't evict the resource from all DocLoaders
        * manual-tests/test-iframes-loading-the-same-resource.html: Added.
           Alas it wasn't possible to make a nice layout test, even this manual test
           is not entirely deterministic



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0b93c7ef
2007-03-27 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej.
The WebArchiver needs all the subresources of a document to be accessible
through the DocLoader, so we can't remove a CachedResource simultaneously
from the global Cache and all DocLoaders, just because it needs to be
reloaded in one.
Fixes rdar://problem/5044366
* loader/Cache.cpp:
(WebCore::Cache::remove):
Don't evict the resource from all DocLoaders
* manual-tests/test-iframes-loading-the-same-resource.html: Added.
Alas it wasn't possible to make a nice layout test, even this manual test
is not entirely deterministic
2007-03-27 Mark Rowe <mrowe@apple.com>
Build fix.
......
......@@ -233,12 +233,9 @@ void Cache::remove(CachedResource* resource)
if (resource->referenced())
removeFromLiveResourcesList(resource);
// Notify all doc loaders that might be observing this object still that it has been
// extracted from the set of resources.
HashSet<DocLoader*>::iterator end = m_docLoaders.end();
for (HashSet<DocLoader*>::iterator itr = m_docLoaders.begin(); itr != end; ++itr)
(*itr)->removeCachedResource(resource);
// FIXME: Multiple DocLoaders may still be holding the resource at this point
// effectively resulting in an invisible CachedResource
// Subtract from our size totals.
int delta = -resource->size();
if (delta)
......
<html>
<head>
<script>
setTimeout('document.getElementById("frame2").src = "resources/test-frame.html";', 100);
loadCount = 0
function frame2Loaded() {
if (loadCount < 40) {
setTimeout('document.getElementById("frame2").src = "resources/test-frame.html?'+loadCount+'";', 100);
loadCount++;
}
}
</script>
</head>
<body>
To perform this test attempt to drag one of the apple images in the left frame while the right frame is doing loads. This test is not entirely deterministic so it should be attempted a number of times. <br />
<iframe id="frame1" src="resources/test-frame.html"></iframe>
<iframe id="frame2" onload="frame2Loaded();"></iframe>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment