diff options
author | Ben Murdoch <benm@google.com> | 2011-05-13 16:23:25 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-16 11:35:02 +0100 |
commit | 65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch) | |
tree | f478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/history/PageCache.cpp | |
parent | 47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff) | |
download | external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2 |
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/history/PageCache.cpp')
-rw-r--r-- | Source/WebCore/history/PageCache.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/WebCore/history/PageCache.cpp b/Source/WebCore/history/PageCache.cpp index 7375a9c..a5dfb1e 100644 --- a/Source/WebCore/history/PageCache.cpp +++ b/Source/WebCore/history/PageCache.cpp @@ -252,6 +252,8 @@ bool PageCache::canCachePageContainingThisFrame(Frame* frame) return frame->loader()->documentLoader() && frame->loader()->documentLoader()->mainDocumentError().isNull() + // Do not cache error pages (these can be recognized as pages with substitute data or unreachable URLs). + && !(frame->loader()->documentLoader()->substituteData().isValid() && !frame->loader()->documentLoader()->substituteData().failingURL().isEmpty()) // FIXME: If we ever change this so that frames with plug-ins will be cached, // we need to make sure that we don't cache frames that have outstanding NPObjects // (objects created by the plug-in). Since there is no way to pause/resume a Netscape plug-in, @@ -453,7 +455,7 @@ void PageCache::releaseAutoreleasedPagesNow() m_autoreleaseTimer.stop(); // Postpone dead pruning until all our resources have gone dead. - cache()->setPruneEnabled(false); + memoryCache()->setPruneEnabled(false); CachedPageSet tmp; tmp.swap(m_autoreleaseSet); @@ -463,8 +465,8 @@ void PageCache::releaseAutoreleasedPagesNow() (*it)->destroy(); // Now do the prune. - cache()->setPruneEnabled(true); - cache()->prune(); + memoryCache()->setPruneEnabled(true); + memoryCache()->prune(); } void PageCache::autorelease(PassRefPtr<CachedPage> page) |