diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/history/PageCache.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/history/PageCache.cpp | 17 |
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 7c25701..8d04f6f 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); |