Changeset 252123 in webkit
- Timestamp:
- Nov 5, 2019 9:17:37 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252122 r252123 1 2019-11-05 Kate Cheney <katherine_cheney@apple.com> 2 3 Layout test website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=203706 5 <rdar://problem/56801615> 6 7 Reviewed by Chris Dumez. 8 9 Since the state is reset between tests, the call to 10 setUseITPDatabase(false) is redundant. 11 12 * http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html: 13 * http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html: 14 1 15 2019-11-05 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html
r250393 r252123 9 9 <script> 10 10 if (window.testRunner) { 11 testRunner.setUseITPDatabase(false);12 11 testRunner.waitUntilDone(); 13 12 testRunner.dumpAsText(); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html
r251287 r252123 11 11 <br> 12 12 <script> 13 testRunner.setUseITPDatabase(false);14 13 testRunner.waitUntilDone(); 15 14 testRunner.dumpAsText(); -
trunk/Source/WebKit/ChangeLog
r252116 r252123 1 2019-11-05 Kate Cheney <katherine_cheney@apple.com> 2 3 Layout test website-data-removal-for-site-navigated-to-with-link-decoration.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=203706 5 <rdar://problem/56801615> 6 7 Reviewed by Chris Dumez. 8 9 No new tests, this change is tested by the existing resourceLoadStatistics 10 tests. 11 12 This test started flaking when a new memory store was being created 13 between tests to maintain consistency. The call to grandfatherExistingWebsiteData 14 from populateMemoryStoreFromDisk in the persistent storage was 15 async, causing a race condition that led to occasional failures. 16 Adding a completion handler and changing the callsite of 17 populateMemoryStoreFromDisk should fix this problem. 18 19 * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: 20 (WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): 21 * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: 22 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: 23 (WebKit::WebResourceLoadStatisticsStore::populateMemoryStoreFromDisk): 24 1 25 2019-11-05 John Wilander <wilander@apple.com> 2 26 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp
r251672 r252123 184 184 } 185 185 186 void ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk( )186 void ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk(CompletionHandler<void()>&& completionHandler) 187 187 { 188 188 ASSERT(!RunLoop::isMain()); … … 190 190 String filePath = resourceLogFilePath(); 191 191 if (filePath.isEmpty() || !FileSystem::fileExists(filePath)) { 192 m_memoryStore.grandfatherExistingWebsiteData( []() { });192 m_memoryStore.grandfatherExistingWebsiteData(WTFMove(completionHandler)); 193 193 monitorDirectoryForNewStatistics(); 194 194 return; … … 197 197 if (!hasFileChangedSince(filePath, m_lastStatisticsFileSyncTime)) { 198 198 // No need to grandfather in this case. 199 completionHandler(); 199 200 return; 200 201 } … … 204 205 auto decoder = createForFile(filePath); 205 206 if (!decoder) { 206 m_memoryStore.grandfatherExistingWebsiteData( []() { });207 m_memoryStore.grandfatherExistingWebsiteData(WTFMove(completionHandler)); 207 208 return; 208 209 } … … 215 216 216 217 m_memoryStore.logTestingEvent("PopulatedWithoutGrandfathering"_s); 218 completionHandler(); 217 219 } 218 220 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h
r251672 r252123 55 55 enum class ForceImmediateWrite { No, Yes, }; 56 56 void scheduleOrWriteMemoryStore(ForceImmediateWrite); 57 void populateMemoryStoreFromDisk( );57 void populateMemoryStoreFromDisk(CompletionHandler<void()>&&); 58 58 59 59 private: -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
r252014 r252123 226 226 ASSERT(RunLoop::isMain()); 227 227 228 postTask([this, completionHandler = WTFMove(completionHandler)]() mutable {228 postTask([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)]() mutable { 229 229 if (m_persistentStorage) 230 m_persistentStorage->populateMemoryStoreFromDisk(); 231 232 postTaskReply(WTFMove(completionHandler)); 230 m_persistentStorage->populateMemoryStoreFromDisk([protectedThis = WTFMove(protectedThis), completionHandler = WTFMove(completionHandler)]() mutable { 231 postTaskReply(WTFMove(completionHandler)); 232 }); 233 else 234 postTaskReply(WTFMove(completionHandler)); 233 235 }); 234 236 }
Note: See TracChangeset
for help on using the changeset viewer.