summaryrefslogtreecommitdiffstats
path: root/WebCore/history/PageCache.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/history/PageCache.cpp
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/history/PageCache.cpp')
-rw-r--r--WebCore/history/PageCache.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/WebCore/history/PageCache.cpp b/WebCore/history/PageCache.cpp
index 7c25701..8d04f6f 100644
--- a/WebCore/history/PageCache.cpp
+++ b/WebCore/history/PageCache.cpp
@@ -63,6 +63,23 @@ void PageCache::setCapacity(int capacity)
prune();
}
+int PageCache::frameCount() const
+{
+ int frameCount = 0;
+ for (HistoryItem* current = m_head; current; current = current->m_next) {
+ ++frameCount;
+ ASSERT(current->m_cachedPage);
+ frameCount += current->m_cachedPage ? current->m_cachedPage->cachedMainFrame()->descendantFrameCount() : 0;
+ }
+
+ return frameCount;
+}
+
+int PageCache::autoreleasedPageCount() const
+{
+ return m_autoreleaseSet.size();
+}
+
void PageCache::add(PassRefPtr<HistoryItem> prpItem, PassRefPtr<CachedPage> cachedPage)
{
ASSERT(prpItem);