Changeset 179704 in webkit
- Timestamp:
- Feb 5, 2015 1:48:16 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r179703 r179704 1 2015-02-05 Chris Dumez <cdumez@apple.com> 2 3 [WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize() 4 https://bugs.webkit.org/show_bug.cgi?id=141297 5 6 Reviewed by Antti Koivisto. 7 8 Populate m_contentsFilter bloom filter from the main dispatch queue 9 NetworkCacheStorage::initialize() to avoid thread-safety issues. 10 11 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm: 12 (WebKit::NetworkCacheStorage::initialize): 13 1 14 2015-02-05 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm
r179703 r179704 130 130 131 131 StringCapture cachePathCapture(m_directoryPath); 132 auto& diskContentsFilter = m_contentsFilter;133 132 auto& entryCount = m_approximateEntryCount; 134 133 135 dispatch_async(m_backgroundIOQueue.get(), [ cachePathCapture, &diskContentsFilter, &entryCount] {134 dispatch_async(m_backgroundIOQueue.get(), [this, cachePathCapture, &entryCount] { 136 135 String cachePath = cachePathCapture.string(); 137 traverseCacheFiles(cachePath, [ &diskContentsFilter, &entryCount](const String& fileName, const String&) {136 traverseCacheFiles(cachePath, [this, &entryCount](const String& fileName, const String&) { 138 137 NetworkCacheKey::HashType hash; 139 138 if (!NetworkCacheKey::stringToHash(fileName, hash)) 140 139 return; 141 diskContentsFilter.add(hash); 140 dispatch_async(dispatch_get_main_queue(), [this, hash] { 141 m_contentsFilter.add(hash); 142 }); 142 143 ++entryCount; 143 144 });
Note: See TracChangeset
for help on using the changeset viewer.