Changeset 228041 in webkit
- Timestamp:
- Feb 2, 2018 6:05:54 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r228033 r228041 1 2018-02-02 Youenn Fablet <youenn@apple.com> 2 3 CacheStorage should check for origin file presence when computing the origin of a folder 4 https://bugs.webkit.org/show_bug.cgi?id=182454 5 6 Reviewed by Chris Dumez. 7 8 In case caches is opened for an origin but no cache is added, we do not have a caches name file but we do have an origin filename. 9 We should be checking the origin filename anyway since we will be reading it afterwards. 10 11 * NetworkProcess/cache/CacheStorageEngineCaches.cpp: 12 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory): 13 1 14 2018-02-02 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
r227768 r228041 58 58 void Caches::retrieveOriginFromDirectory(const String& folderPath, WorkQueue& queue, WTF::CompletionHandler<void(std::optional<WebCore::ClientOrigin>&&)>&& completionHandler) 59 59 { 60 queue.dispatch([completionHandler = WTFMove(completionHandler), f olderPath = folderPath.isolatedCopy()]() mutable {61 if (!WebCore::FileSystem::fileExists( cachesListFilename(folderPath))) {60 queue.dispatch([completionHandler = WTFMove(completionHandler), filename = cachesOriginFilename(folderPath)]() mutable { 61 if (!WebCore::FileSystem::fileExists(filename)) { 62 62 RunLoop::main().dispatch([completionHandler = WTFMove(completionHandler)]() mutable { 63 63 completionHandler(std::nullopt); … … 66 66 } 67 67 68 auto channel = IOChannel::open( cachesOriginFilename(folderPath), IOChannel::Type::Read);68 auto channel = IOChannel::open(filename, IOChannel::Type::Read); 69 69 channel->read(0, std::numeric_limits<size_t>::max(), nullptr, [completionHandler = WTFMove(completionHandler)](const Data& data, int error) mutable { 70 70 ASSERT(RunLoop::isMain());
Note: See TracChangeset
for help on using the changeset viewer.