Changeset 199061 in webkit
- Timestamp:
- Apr 5, 2016 9:50:29 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199060 r199061 1 2016-04-05 Chris Dumez <cdumez@apple.com> 2 3 We sometimes fail to remove outdated entry from the disk cache after revalidation and when the resource is no longer cacheable 4 https://bugs.webkit.org/show_bug.cgi?id=156048 5 <rdar://problem/25514480> 6 7 Reviewed by Antti Koivisto. 8 9 Add test coverage for the bug. 10 11 * http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes-expected.txt: Added. 12 * http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html: Added. 13 * http/tests/cache/disk-cache/resources/json.php: Added. 14 1 15 2016-04-05 Antti Koivisto <antti@apple.com> 2 16 -
trunk/Source/WebKit2/ChangeLog
r199055 r199061 1 2016-04-05 Chris Dumez <cdumez@apple.com> 2 3 We sometimes fail to remove outdated entry from the disk cache after revalidation and when the resource is no longer cacheable 4 https://bugs.webkit.org/show_bug.cgi?id=156048 5 <rdar://problem/25514480> 6 7 Reviewed by Antti Koivisto. 8 9 We would sometimes fail to remove outdated entry from the disk cache 10 after revalidation and when the resource is no longer cacheable. This 11 was due to Storage::removeFromPendingWriteOperations() only removing 12 the first pending write operation with a given key instead of actually 13 removing all of the operations with this key. 14 15 * NetworkProcess/cache/NetworkCacheStorage.cpp: 16 (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations): 17 * NetworkProcess/cache/NetworkCacheStorage.h: 18 1 19 2016-04-05 Antoine Quint <graouts@apple.com> 2 20 -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp
r194496 r199061 524 524 } 525 525 526 bool Storage::removeFromPendingWriteOperations(const Key& key) 527 { 528 auto end = m_pendingWriteOperations.end(); 529 for (auto it = m_pendingWriteOperations.begin(); it != end; ++it) { 530 if ((*it)->record.key == key) { 531 m_pendingWriteOperations.remove(it); 532 return true; 533 } 534 } 535 return false; 526 void Storage::removeFromPendingWriteOperations(const Key& key) 527 { 528 while (true) { 529 auto found = m_pendingWriteOperations.findIf([&key](const std::unique_ptr<WriteOperation>& operation) { 530 return operation->record.key == key; 531 }); 532 533 if (found == m_pendingWriteOperations.end()) 534 break; 535 536 m_pendingWriteOperations.remove(found); 537 } 536 538 } 537 539 -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h
r198202 r199061 123 123 124 124 void updateFileModificationTime(const String& path); 125 boolremoveFromPendingWriteOperations(const Key&);125 void removeFromPendingWriteOperations(const Key&); 126 126 127 127 WorkQueue& ioQueue() { return m_ioQueue.get(); }
Note: See TracChangeset
for help on using the changeset viewer.