Title: [240247] trunk/Source/WebKit
- Revision
- 240247
- Author
- bfulg...@apple.com
- Date
- 2019-01-21 17:55:47 -0800 (Mon, 21 Jan 2019)
Log Message
Unreviewed test fix after r240243
Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
<rdar://problem/47433602>
The new ResourceLoadStatistics section of 'removeData' was incrementing the
pending callback count before deciding whether to send a message to delete
data. This left the count out-of-balance leading to the operation never
completing.
This patch also prevents sending a second message to the NetworkProcess
requesting data be deleted if the message was already sent in an earlier
section of the method (e.g., as typically happens when all website data
is being deleted).
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (240246 => 240247)
--- trunk/Source/WebKit/ChangeLog 2019-01-22 01:30:05 UTC (rev 240246)
+++ trunk/Source/WebKit/ChangeLog 2019-01-22 01:55:47 UTC (rev 240247)
@@ -1,5 +1,24 @@
2019-01-21 Brent Fulgham <bfulg...@apple.com>
+ Unreviewed test fix after r240243
+ Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
+ <rdar://problem/47433602>
+
+ The new ResourceLoadStatistics section of 'removeData' was incrementing the
+ pending callback count before deciding whether to send a message to delete
+ data. This left the count out-of-balance leading to the operation never
+ completing.
+
+ This patch also prevents sending a second message to the NetworkProcess
+ requesting data be deleted if the message was already sent in an earlier
+ section of the method (e.g., as typically happens when all website data
+ is being deleted).
+
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::removeData):
+
+2019-01-21 Brent Fulgham <bfulg...@apple.com>
+
Implement message handlers for NetworkProcess-based ResourceLoadStatistics
https://bugs.webkit.org/show_bug.cgi?id=193556
<rdar://problem/47368501>
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (240246 => 240247)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2019-01-22 01:30:05 UTC (rev 240246)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2019-01-22 01:55:47 UTC (rev 240247)
@@ -757,6 +757,7 @@
}
#endif
+ bool didNotifyNetworkProcessToDeleteWebsiteData = false;
auto networkProcessAccessType = computeNetworkProcessAccessTypeForDataRemoval(dataTypes, !isPersistent());
if (networkProcessAccessType != ProcessAccessType::None) {
for (auto& processPool : processPools()) {
@@ -778,6 +779,7 @@
processPool->networkProcess()->deleteWebsiteData(m_sessionID, dataTypes, modifiedSince, [callbackAggregator, processPool] {
callbackAggregator->removePendingCallback();
});
+ didNotifyNetworkProcessToDeleteWebsiteData = true;
}
}
@@ -938,15 +940,15 @@
// we do not need to re-grandfather old data.
auto shouldGrandfather = ((monitoredTypesRaw & deletedTypesRaw) == monitoredTypesRaw) ? ShouldGrandfather::No : ShouldGrandfather::Yes;
- callbackAggregator->addPendingCallback();
-
if (m_resourceLoadStatistics) {
+ callbackAggregator->addPendingCallback();
m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(modifiedSince, shouldGrandfather, [callbackAggregator] {
callbackAggregator->removePendingCallback();
});
- } else {
+ } else if (!didNotifyNetworkProcessToDeleteWebsiteData) {
for (auto& processPool : processPools()) {
if (auto* process = processPool->networkProcess()) {
+ callbackAggregator->addPendingCallback();
process->deleteWebsiteData(m_sessionID, dataTypes, modifiedSince, [callbackAggregator] {
callbackAggregator->removePendingCallback();
});
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes