[webkit-changes] [WebKit/WebKit] c7f134: Protect CachedResource in more places
Chris Dumez
noreply at github.com
Wed Jul 19 10:14:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c7f1348de5c2f2408c007dfebbb77ade584970fa
https://github.com/WebKit/WebKit/commit/c7f1348de5c2f2408c007dfebbb77ade584970fa
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-07-19 (Wed, 19 Jul 2023)
Changed paths:
M Source/WebCore/loader/SubresourceLoader.cpp
M Source/WebCore/loader/cache/CachedFont.cpp
M Source/WebCore/loader/cache/CachedImage.cpp
M Source/WebCore/loader/cache/CachedResource.cpp
M Source/WebCore/loader/cache/CachedResourceHandle.cpp
M Source/WebCore/loader/cache/CachedResourceHandle.h
M Source/WebCore/loader/cache/MemoryCache.cpp
M Source/WebCore/loader/cache/MemoryCache.h
Log Message:
-----------
Protect CachedResource in more places
https://bugs.webkit.org/show_bug.cgi?id=259331
rdar://80172764
Reviewed by David Kilzer.
Protect CachedResource in more places. In particular, a call to MemoryCache::remove()
may delete the resource it is passed so it is important to protect the resource if
we're going to use it after.
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFail):
* Source/WebCore/loader/cache/CachedFont.cpp:
(WebCore::CachedFont::setErrorAndDeleteData):
* Source/WebCore/loader/cache/CachedImage.cpp:
(WebCore::CachedImage::updateBufferInternal):
* Source/WebCore/loader/cache/CachedResource.cpp:
(WebCore::CachedResource::redirectReceived):
* Source/WebCore/loader/cache/CachedResourceHandle.cpp:
(WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
* Source/WebCore/loader/cache/CachedResourceHandle.h:
(WebCore::CachedResourceHandle::CachedResourceHandle):
* Source/WebCore/loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequestImpl):
(WebCore::MemoryCache::forEachSessionResource):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::removeResourcesWithOrigins):
(WebCore::MemoryCache::getStatistics):
* Source/WebCore/loader/cache/MemoryCache.h:
Canonical link: https://commits.webkit.org/266163@main
More information about the webkit-changes
mailing list