Changeset 228078 in webkit
- Timestamp:
- Feb 4, 2018 9:30:56 PM (6 years ago)
- Location:
- branches/safari-605-branch/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/Source/WebKit/ChangeLog
r228074 r228078 1 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r228041. rdar://problem/37220123 4 5 2018-02-02 Youenn Fablet <youenn@apple.com> 6 7 CacheStorage should check for origin file presence when computing the origin of a folder 8 https://bugs.webkit.org/show_bug.cgi?id=182454 9 10 Reviewed by Chris Dumez. 11 12 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. 13 We should be checking the origin filename anyway since we will be reading it afterwards. 14 15 * NetworkProcess/cache/CacheStorageEngineCaches.cpp: 16 (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory): 17 1 18 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 19 -
branches/safari-605-branch/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
r227835 r228078 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.