-
commit-queue@webkit.org authored
.: REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Patch by Scott Graham <scottmg@chromium.org> on 2011-08-01 Reviewed by Antti Koivisto. Update exports for test harness. * Source/autotools/symbols.filter: Source/WebCore: REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Patch by Scott Graham <scottmg@chromium.org> on 2011-08-01 Reviewed by Antti Koivisto. Upon completing a load start a Timer to iterate through CachedResourceLoader's m_documentResources map to check for any items that have only one reference (thus being the reference in the map itself). The map should really be weak, but because the CachedResourceHandle achieves bookkeeping work in addition to reference counting, this is a simpler and more localized way to free the used memory while maintaining the other behaviour (when CachedResource is used as proxy). With this patch the testcase at https://bugs.webkit.org/attachment.cgi?id=93850 should no longer consume 400MB of ram on load. Test added for crash discovered in previous revision, but no tests for memory usage. Test: http/tests/inspector/network/disabled-cache-crash.html * WebCore.exp.in: * loader/cache/CachedResource.h: (WebCore::CachedResource::hasOneHandle): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::loadDone): (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): * loader/cache/CachedResourceLoader.h: * testing/Internals.cpp: (WebCore::Internals::disableMemoryCache): * testing/Internals.h: * testing/Internals.idl: Source/WebKit2: REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Patch by Scott Graham <scottmg@chromium.org> on 2011-08-01 Reviewed by Antti Koivisto. Update exports for test harness. * win/WebKit2.def: * win/WebKit2CFLite.def: LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=61006 Test for CachedResourceLoader. Not caused by cache-disabling but very difficult to reproduce when cache is active, so use cache disable in inspector to exercise code. Patch by Scott Graham <scottmg@chromium.org> on 2011-08-01 Reviewed by Antti Koivisto. * http/tests/inspector/network/disabled-cache-crash-expected.txt: Added. * http/tests/inspector/network/disabled-cache-crash.html: Added. * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@92143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9acd5fe0