Memory cache pruning should be protected against reentering.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 18:26:25 +0000 (18:26 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 18:26:25 +0000 (18:26 +0000)
commit9650de7fa213c8ca26fbdddc8bc3bf835c7392b9
tree75234f444ee094e9e74b3210b33d677e7dfb01c3
parentc96ca6bc206340c89b31830fb9a60de56383e765
Memory cache pruning should be protected against reentering.
https://bugs.webkit.org/show_bug.cgi?id=85077

Reviewed by Alexey Proskuryakov.

MemoryCache::pruneDeadResourcesToSize() has some ad-hock protection against reentering.
This patch adds more complete protection.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::MemoryCache):
(WebCore::MemoryCache::pruneLiveResourcesToSize):

    Protect live resource pruning too.

(WebCore::MemoryCache::pruneDeadResourcesToSize):

    Remove the existing weak reentrancy handling in favor of full proctection.

* loader/cache/MemoryCache.h:
(MemoryCache):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/loader/cache/MemoryCache.h