summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/history/PageCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/history/PageCache.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/history/PageCache.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/history/PageCache.cpp b/src/3rdparty/webkit/WebCore/history/PageCache.cpp
index 7c25701c9..8d04f6f9b 100644
--- a/src/3rdparty/webkit/WebCore/history/PageCache.cpp
+++ b/src/3rdparty/webkit/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);