Make memoryCache() return a reference
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Nov 2014 17:04:42 +0000 (17:04 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Nov 2014 17:04:42 +0000 (17:04 +0000)
commit03e5830823e96b9e66ce35c476a72ed62013891f
tree612b7288ceb728a12412851dc10ca2b38d32754b
parenta5ef23ff5a2169051cb926ae2908dca874a2f8e7
Make memoryCache() return a reference
https://bugs.webkit.org/show_bug.cgi?id=138939

Reviewed by Antti Koivisto.

Source/WebCore:

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedResource.cpp:
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::~CachedResource):
(WebCore::CachedResource::failBeforeStarting):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::setEncodedSize):
(WebCore::CachedResource::didAccessDecodedData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/cache/MemoryCache.cpp:
(WebCore::memoryCache):
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* loader/cache/MemoryCache.h:
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::resourceBecameFileBacked):
* page/FrameView.cpp:
(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::didPaintContents):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache statistics]):
(+[WebCache emptyInMemoryResources]):
(+[WebCache sizeOfDeadResources:]):
(+[WebCache addImageToCache:forURL:forFrame:]):
(+[WebCache removeImageFromCacheForURL:forFrame:]):
(+[WebCache imageForURL:]):
(+[WebCache setDisabled:]):
(+[WebCache isDisabled]):
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKit/win:

* WebCache.cpp:
(WebCache::statistics):
(WebCache::empty):
(WebCache::setDisabled):
(WebCache::disabled):
* WebView.cpp:
(WebView::setCacheModel):

Source/WebKit2:

* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::clearResourceCaches):
(WebKit::getWebCoreMemoryCacheStatistics):
(WebKit::WebProcess::setMemoryCacheDisabled):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/loader/cache/MemoryCache.h
Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm
Source/WebCore/page/FrameView.cpp
Source/WebCore/platform/MemoryPressureHandler.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebCache.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCache.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Network/NetworkProcessConnection.cpp
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm
Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp