Changeset 80686 in webkit


Ignore:
Timestamp:
Mar 9, 2011 6:55:02 PM (13 years ago)
Author:
mihaip@chromium.org
Message:

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):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80685 r80686  
     12011-03-09  Mihai Parparita  <mihaip@chromium.org>
     2
     3        Reviewed by Tony Gentilcore.
     4
     5        REGRESSION (r74807): memory corruption after CachedResourceLoader refactoring
     6        https://bugs.webkit.org/show_bug.cgi?id=53045
     7       
     8        Copy the URL out of the CachedResource that is being revalidated, so
     9        that we can still use it (in m_validatedURLs) after removing the
     10        resource from the memory cache, which may delete it.
     11
     12        No new tests, since I was not able to trigger this locally (in a layout
     13        test or otherwise).
     14
     15        * loader/cache/CachedResourceLoader.cpp:
     16        (WebCore::CachedResourceLoader::revalidateResource):
     17
    1182011-03-09  Chris Fleizach  <cfleizach@apple.com>
    219
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r78816 r80686  
    341341    ASSERT(!resource->resourceToRevalidate());
    342342   
    343     const String& url = resource->url();
     343    // Copy the URL out of the resource to be revalidated in case it gets deleted by the remove() call below.
     344    String url = resource->url();
    344345    CachedResource* newResource = createResource(resource->type(), KURL(ParsedURLString, url), resource->encoding());
    345346   
Note: See TracChangeset for help on using the changeset viewer.