Title: [179704] trunk/Source/WebKit2
- Revision
- 179704
- Author
- [email protected]
- Date
- 2015-02-05 13:48:16 -0800 (Thu, 05 Feb 2015)
Log Message
[WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize()
https://bugs.webkit.org/show_bug.cgi?id=141297
Reviewed by Antti Koivisto.
Populate m_contentsFilter bloom filter from the main dispatch queue
NetworkCacheStorage::initialize() to avoid thread-safety issues.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::initialize):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (179703 => 179704)
--- trunk/Source/WebKit2/ChangeLog 2015-02-05 21:46:11 UTC (rev 179703)
+++ trunk/Source/WebKit2/ChangeLog 2015-02-05 21:48:16 UTC (rev 179704)
@@ -1,5 +1,18 @@
2015-02-05 Chris Dumez <[email protected]>
+ [WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize()
+ https://bugs.webkit.org/show_bug.cgi?id=141297
+
+ Reviewed by Antti Koivisto.
+
+ Populate m_contentsFilter bloom filter from the main dispatch queue
+ NetworkCacheStorage::initialize() to avoid thread-safety issues.
+
+ * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
+ (WebKit::NetworkCacheStorage::initialize):
+
+2015-02-05 Chris Dumez <[email protected]>
+
Use deleteFile() in NetworkCacheStorageCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=141299
Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm (179703 => 179704)
--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm 2015-02-05 21:46:11 UTC (rev 179703)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm 2015-02-05 21:48:16 UTC (rev 179704)
@@ -129,16 +129,17 @@
ASSERT(RunLoop::isMain());
StringCapture cachePathCapture(m_directoryPath);
- auto& diskContentsFilter = m_contentsFilter;
auto& entryCount = m_approximateEntryCount;
- dispatch_async(m_backgroundIOQueue.get(), [cachePathCapture, &diskContentsFilter, &entryCount] {
+ dispatch_async(m_backgroundIOQueue.get(), [this, cachePathCapture, &entryCount] {
String cachePath = cachePathCapture.string();
- traverseCacheFiles(cachePath, [&diskContentsFilter, &entryCount](const String& fileName, const String&) {
+ traverseCacheFiles(cachePath, [this, &entryCount](const String& fileName, const String&) {
NetworkCacheKey::HashType hash;
if (!NetworkCacheKey::stringToHash(fileName, hash))
return;
- diskContentsFilter.add(hash);
+ dispatch_async(dispatch_get_main_queue(), [this, hash] {
+ m_contentsFilter.add(hash);
+ });
++entryCount;
});
});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes