// Garbage collecting m_documentResources is a workaround for the // ResourcePtrs on the RHS being strong references. Ideally this // would be a weak map, however ResourcePtrs perform additional // bookkeeping on Resources, so instead pseudo-GC them -- when the // reference count reaches 1, m_documentResources is the only reference, so // remove it from the map. void ResourceFetcher::garbageCollectDocumentResourcesTimerFired(Timer<ResourceFetcher>* timer) { ASSERT_UNUSED(timer, timer == &m_garbageCollectDocumentResourcesTimer); garbageCollectDocumentResources(); }
// Garbage collecting m_documentResources is a workaround for the // CachedResourceHandles on the RHS being strong references. Ideally this // would be a weak map, however CachedResourceHandles perform additional // bookkeeping on CachedResources, so instead pseudo-GC them -- when the // reference count reaches 1, m_documentResources is the only reference, so // remove it from the map. void CachedResourceLoader::garbageCollectDocumentResourcesTimerFired(Timer<CachedResourceLoader>* timer) { ASSERT_UNUSED(timer, timer == &m_garbageCollectDocumentResourcesTimer); garbageCollectDocumentResources(); }