Commit f41489ca authored by mihaip@chromium.org's avatar mihaip@chromium.org

2011-03-09 Mihai Parparita <mihaip@chromium.org>

        Reviewed by Tony Gentilcore.

        REGRESSION (r74807): memory corruption after CachedResourceLoader refactoring
        https://bugs.webkit.org/show_bug.cgi?id=53045

        Copy the URL out of the CachedResource that is being revalidated, so
        that we can still use it (in m_validatedURLs) after removing the
        resource from the memory cache, which may delete it.

        No new tests, since I was not able to trigger this locally (in a layout
        test or otherwise).

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::revalidateResource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4eece7c8
2011-03-09 Mihai Parparita <mihaip@chromium.org>
Reviewed by Tony Gentilcore.
REGRESSION (r74807): memory corruption after CachedResourceLoader refactoring
https://bugs.webkit.org/show_bug.cgi?id=53045
Copy the URL out of the CachedResource that is being revalidated, so
that we can still use it (in m_validatedURLs) after removing the
resource from the memory cache, which may delete it.
No new tests, since I was not able to trigger this locally (in a layout
test or otherwise).
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::revalidateResource):
2011-03-09 Chris Fleizach <cfleizach@apple.com>
Reviewed by Beth Dakin.
......
......@@ -340,7 +340,8 @@ CachedResource* CachedResourceLoader::revalidateResource(CachedResource* resourc
ASSERT(resource->canUseCacheValidator());
ASSERT(!resource->resourceToRevalidate());
const String& url = resource->url();
// Copy the URL out of the resource to be revalidated in case it gets deleted by the remove() call below.
String url = resource->url();
CachedResource* newResource = createResource(resource->type(), KURL(ParsedURLString, url), resource->encoding());
LOG(ResourceLoading, "Resource %p created to revalidate %p", newResource, resource);
......
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