Drop non-const getter for CachedResource::resourceRequest()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Aug 2017 21:07:55 +0000 (21:07 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Aug 2017 21:07:55 +0000 (21:07 +0000)
commit9bc27186e3ca2a03bd96169cd025e9c67bcc4b1b
tree7ddd96c2e38e2f72a7f5e2c32d55595ba33fe1e8
parent025f9983e7163b5b119376e755735577750b69e3
Drop non-const getter for CachedResource::resourceRequest()
https://bugs.webkit.org/show_bug.cgi?id=175524

Reviewed by Youenn Fablet.

Drop non-const getter for CachedResource::resourceRequest(). It would be unsafe to modify the request of a CachedResource
after it has been cached. Exposing such a getter is therefore a footgun.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::resourceRequest const):
(WebCore::CachedResource::ignoreForRequestCount const):
(WebCore::CachedResource::setIgnoreForRequestCount):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::ignoreForRequestCount const):
(WebCore::CachedResourceRequest::setIgnoreForRequestCount):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
* platform/network/ResourceRequestBase.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/LinkLoader.cpp
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedImage.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceRequest.h
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/platform/network/ResourceRequestBase.h