[Webkit-unassigned] [Bug 22994] Resources loaded from the memory cache do not get correctly inserted into the DocLoader resource map

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 17 17:15:09 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=22994


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric at webkit.org




--- Comment #5 from Eric Seidel <eric at webkit.org>  2011-05-17 17:15:08 PST ---
I believe that http://trac.webkit.org/changeset/39725 introduced a leak of all CachedResources.

m_documentResources holds a CachedResourceHandle:
    typedef HashMap<String, CachedResourceHandle<CachedResource> > DocumentResourceMap;

The only time that a CachedResource is ever destroyed is when its handle count hits 0:

    bool canDelete() const { return !hasClients() && !m_request && !m_preloadCount && !m_handleCount && !m_resourceToRevalidate && !m_proxyResource; }
http://trac.webkit.org/browser/trunk/Source/WebCore/loader/cache/CachedResource.h#L176

But the only way to ever be removed from this map is from:
void CachedResourceLoader::removeCachedResource(CachedResource* resource) const

Which is only ever called from ~CachedResource().

This has been reported various times to Chromium (but affects all webkit implementations):
http://code.google.com/p/chromium/issues/detail?id=36142

I'll file a WebKit bug shortly.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list