Title: [236233] trunk/Source/WebKit
- Revision
- 236233
- Author
- [email protected]
- Date
- 2018-09-19 17:20:05 -0700 (Wed, 19 Sep 2018)
Log Message
Unreviewed, rolling out r236229.
caused API timouts on mac and ios
Reverted changeset:
"Clear persistent storage between tests for
resourceLoadStatistics"
https://bugs.webkit.org/show_bug.cgi?id=189684
https://trac.webkit.org/changeset/236229
Patch by Dawei Fenton <[email protected]> on 2018-09-19
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (236232 => 236233)
--- trunk/Source/WebKit/ChangeLog 2018-09-20 00:13:25 UTC (rev 236232)
+++ trunk/Source/WebKit/ChangeLog 2018-09-20 00:20:05 UTC (rev 236233)
@@ -1,3 +1,16 @@
+2018-09-19 Dawei Fenton <[email protected]>
+
+ Unreviewed, rolling out r236229.
+
+ caused API timouts on mac and ios
+
+ Reverted changeset:
+
+ "Clear persistent storage between tests for
+ resourceLoadStatistics"
+ https://bugs.webkit.org/show_bug.cgi?id=189684
+ https://trac.webkit.org/changeset/236229
+
2018-09-19 Alex Christensen <[email protected]>
REGRESSION(236154) C API clients not using WKPageSetPageNavigationClient couldn't complete HTTPS requests
Modified: trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp (236232 => 236233)
--- trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp 2018-09-20 00:13:25 UTC (rev 236232)
+++ trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp 2018-09-20 00:20:05 UTC (rev 236233)
@@ -484,7 +484,7 @@
return;
statisticsStore->resetParametersToDefaultValues([callbackAggregator = callbackAggregator.copyRef()] { });
- statisticsStore->scheduleClearInMemoryAndPersistent(WebKit::WebResourceLoadStatisticsStore::ShouldGrandfather::No, [callbackAggregator = callbackAggregator.copyRef()] { });
+ statisticsStore->scheduleClearInMemory([callbackAggregator = callbackAggregator.copyRef()] { });
}
void WKWebsiteDataStoreRemoveAllFetchCaches(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveFetchCacheRemovalFunction callback)
Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (236232 => 236233)
--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2018-09-20 00:13:25 UTC (rev 236232)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp 2018-09-20 00:20:05 UTC (rev 236233)
@@ -759,30 +759,41 @@
}
#endif
+void WebResourceLoadStatisticsStore::scheduleClearInMemory(CompletionHandler<void()>&& completionHandler)
+{
+ ASSERT(RunLoop::isMain());
+ postTask([this, completionHandler = WTFMove(completionHandler)]() mutable {
+
+ CompletionHandler<void()> callCompletionHandlerOnMainThread = [completionHandler = WTFMove(completionHandler)]() mutable {
+ postTaskReply(WTFMove(completionHandler));
+ };
+
+ if (!m_memoryStore) {
+ callCompletionHandlerOnMainThread();
+ return;
+ }
+
+ m_memoryStore->clear(WTFMove(callCompletionHandlerOnMainThread));
+ });
+}
+
void WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent(ShouldGrandfather shouldGrandfather, CompletionHandler<void()>&& completionHandler)
{
ASSERT(RunLoop::isMain());
- postTask([this, protectedThis = makeRef(*this), shouldGrandfather, completionHandler = WTFMove(completionHandler)] () mutable {
+ postTask([this, shouldGrandfather, completionHandler = WTFMove(completionHandler)] () mutable {
+ if (m_memoryStore)
+ m_memoryStore->clear([] { });
if (m_persistentStorage)
m_persistentStorage->clear();
-
- CompletionHandlerCallingScope completionHandlerCaller([completionHandler = WTFMove(completionHandler)]() mutable {
+
+ CompletionHandler<void()> callCompletionHandlerOnMainThread = [completionHandler = WTFMove(completionHandler)]() mutable {
postTaskReply(WTFMove(completionHandler));
- });
+ };
- if (m_memoryStore) {
- m_memoryStore->clear([this, protectedThis = protectedThis.copyRef(), shouldGrandfather, completionHandlerCaller = WTFMove(completionHandlerCaller)] () mutable {
- if (shouldGrandfather == ShouldGrandfather::Yes) {
- if (m_memoryStore)
- m_memoryStore->grandfatherExistingWebsiteData(completionHandlerCaller.release());
- else
- RELEASE_LOG(ResourceLoadStatistics, "WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent After being cleared, m_memoryStore is null when trying to grandfather data.");
- }
- });
- } else {
- if (shouldGrandfather == ShouldGrandfather::Yes)
- RELEASE_LOG(ResourceLoadStatistics, "WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent Before being cleared, m_memoryStore is null when trying to grandfather data.");
- }
+ if (shouldGrandfather == ShouldGrandfather::Yes && m_memoryStore)
+ m_memoryStore->grandfatherExistingWebsiteData(WTFMove(callCompletionHandlerOnMainThread));
+ else
+ callCompletionHandlerOnMainThread();
});
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes