Changeset 236233 in webkit
- Timestamp:
- Sep 19, 2018, 5:20:05 PM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/C/WKWebsiteDataStoreRef.cpp (modified) (1 diff)
-
UIProcess/WebResourceLoadStatisticsStore.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r236232 r236233 1 2018-09-19 Dawei Fenton <realdawei@apple.com> 2 3 Unreviewed, rolling out r236229. 4 5 caused API timouts on mac and ios 6 7 Reverted changeset: 8 9 "Clear persistent storage between tests for 10 resourceLoadStatistics" 11 https://bugs.webkit.org/show_bug.cgi?id=189684 12 https://trac.webkit.org/changeset/236229 13 1 14 2018-09-19 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
r236229 r236233 485 485 486 486 statisticsStore->resetParametersToDefaultValues([callbackAggregator = callbackAggregator.copyRef()] { }); 487 statisticsStore->scheduleClearInMemory AndPersistent(WebKit::WebResourceLoadStatisticsStore::ShouldGrandfather::No,[callbackAggregator = callbackAggregator.copyRef()] { });487 statisticsStore->scheduleClearInMemory([callbackAggregator = callbackAggregator.copyRef()] { }); 488 488 } 489 489 -
trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp
r236229 r236233 760 760 #endif 761 761 762 void WebResourceLoadStatisticsStore::scheduleClearInMemory(CompletionHandler<void()>&& completionHandler) 763 { 764 ASSERT(RunLoop::isMain()); 765 postTask([this, completionHandler = WTFMove(completionHandler)]() mutable { 766 767 CompletionHandler<void()> callCompletionHandlerOnMainThread = [completionHandler = WTFMove(completionHandler)]() mutable { 768 postTaskReply(WTFMove(completionHandler)); 769 }; 770 771 if (!m_memoryStore) { 772 callCompletionHandlerOnMainThread(); 773 return; 774 } 775 776 m_memoryStore->clear(WTFMove(callCompletionHandlerOnMainThread)); 777 }); 778 } 779 762 780 void WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent(ShouldGrandfather shouldGrandfather, CompletionHandler<void()>&& completionHandler) 763 781 { 764 782 ASSERT(RunLoop::isMain()); 765 postTask([this, protectedThis = makeRef(*this), shouldGrandfather, completionHandler = WTFMove(completionHandler)] () mutable { 783 postTask([this, shouldGrandfather, completionHandler = WTFMove(completionHandler)] () mutable { 784 if (m_memoryStore) 785 m_memoryStore->clear([] { }); 766 786 if (m_persistentStorage) 767 787 m_persistentStorage->clear(); 768 769 CompletionHandler CallingScope completionHandlerCaller([completionHandler = WTFMove(completionHandler)]() mutable {788 789 CompletionHandler<void()> callCompletionHandlerOnMainThread = [completionHandler = WTFMove(completionHandler)]() mutable { 770 790 postTaskReply(WTFMove(completionHandler)); 771 }); 772 773 if (m_memoryStore) { 774 m_memoryStore->clear([this, protectedThis = protectedThis.copyRef(), shouldGrandfather, completionHandlerCaller = WTFMove(completionHandlerCaller)] () mutable { 775 if (shouldGrandfather == ShouldGrandfather::Yes) { 776 if (m_memoryStore) 777 m_memoryStore->grandfatherExistingWebsiteData(completionHandlerCaller.release()); 778 else 779 RELEASE_LOG(ResourceLoadStatistics, "WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent After being cleared, m_memoryStore is null when trying to grandfather data."); 780 } 781 }); 782 } else { 783 if (shouldGrandfather == ShouldGrandfather::Yes) 784 RELEASE_LOG(ResourceLoadStatistics, "WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent Before being cleared, m_memoryStore is null when trying to grandfather data."); 785 } 791 }; 792 793 if (shouldGrandfather == ShouldGrandfather::Yes && m_memoryStore) 794 m_memoryStore->grandfatherExistingWebsiteData(WTFMove(callCompletionHandlerOnMainThread)); 795 else 796 callCompletionHandlerOnMainThread(); 786 797 }); 787 798 }
Note:
See TracChangeset
for help on using the changeset viewer.