[webkit-changes] [WebKit/WebKit] e10384: Fix use-after-move in CacheStorageCache::putRecord...
Sihui
noreply at github.com
Thu Feb 2 11:39:38 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e10384deeabd408e49973e4cbc71ad35d70147d9
https://github.com/WebKit/WebKit/commit/e10384deeabd408e49973e4cbc71ad35d70147d9
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp
M Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp
Log Message:
-----------
Fix use-after-move in CacheStorageCache::putRecordsInStore
https://bugs.webkit.org/show_bug.cgi?id=251467
rdar://104531316
Reviewed by Youenn Fablet.
CacheStorageCache::putRecordsInStore should not use WTFMove on members of existingRecord because existingRecord will
be accessed later (existingRecord points to an object in m_records). This patch also ensures CacheStorageCache is
unregistered from CacheStorageRegistry when it is removed, so CacheStorageRegistry could remove the entry from m_caches.
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp:
(WebKit::CacheStorageCache::putRecordsInStore):
* Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp:
(WebKit::CacheStorageManager::removeUnusedCache):
Canonical link: https://commits.webkit.org/259766@main
More information about the webkit-changes
mailing list