Modified: trunk/Source/WebKit/ChangeLog (247917 => 247918)
--- trunk/Source/WebKit/ChangeLog 2019-07-29 20:12:25 UTC (rev 247917)
+++ trunk/Source/WebKit/ChangeLog 2019-07-29 20:15:43 UTC (rev 247918)
@@ -1,3 +1,16 @@
+2019-07-29 Chris Dumez <[email protected]>
+
+ Remove unnecessary null check under WebResourceLoadStatisticsStore::hasStorageAccess()
+ https://bugs.webkit.org/show_bug.cgi?id=200229
+
+ Reviewed by Alex Christensen.
+
+ Remove unnecessary null check under WebResourceLoadStatisticsStore::hasStorageAccess().
+ There is already a null check with an early return a few lines above.
+
+ * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
+
2019-07-29 Wenson Hsieh <[email protected]>
UI process occasionally hangs in -[UIKeyboardTaskQueue lockWhenReadyForMainThread]
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (247917 => 247918)
--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp 2019-07-29 20:12:25 UTC (rev 247917)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp 2019-07-29 20:15:43 UTC (rev 247918)
@@ -296,13 +296,11 @@
return;
}
- if (m_statisticsStore) {
- m_statisticsStore->hasStorageAccess(subFrameDomain, topFrameDomain, frameID, pageID, [completionHandler = WTFMove(completionHandler)](bool hasStorageAccess) mutable {
- postTaskReply([completionHandler = WTFMove(completionHandler), hasStorageAccess]() mutable {
- completionHandler(hasStorageAccess);
- });
+ m_statisticsStore->hasStorageAccess(subFrameDomain, topFrameDomain, frameID, pageID, [completionHandler = WTFMove(completionHandler)](bool hasStorageAccess) mutable {
+ postTaskReply([completionHandler = WTFMove(completionHandler), hasStorageAccess]() mutable {
+ completionHandler(hasStorageAccess);
});
- }
+ });
});
}
@@ -401,13 +399,11 @@
return;
}
- if (m_statisticsStore) {
- m_statisticsStore->grantStorageAccess(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, pageID, promptWasShown, [promptWasShown, completionHandler = WTFMove(completionHandler)](StorageAccessWasGranted wasGrantedAccess) mutable {
- postTaskReply([wasGrantedAccess, promptWasShown, completionHandler = WTFMove(completionHandler)]() mutable {
- completionHandler(wasGrantedAccess, promptWasShown);
- });
+ m_statisticsStore->grantStorageAccess(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, pageID, promptWasShown, [promptWasShown, completionHandler = WTFMove(completionHandler)](StorageAccessWasGranted wasGrantedAccess) mutable {
+ postTaskReply([wasGrantedAccess, promptWasShown, completionHandler = WTFMove(completionHandler)]() mutable {
+ completionHandler(wasGrantedAccess, promptWasShown);
});
- }
+ });
});
}
@@ -879,16 +875,14 @@
postTaskReply(WTFMove(completionHandler));
});
- if (m_statisticsStore) {
- m_statisticsStore->clear([this, protectedThis = protectedThis.copyRef(), shouldGrandfather, callbackAggregator = callbackAggregator.copyRef()] () mutable {
- if (shouldGrandfather == ShouldGrandfatherStatistics::Yes) {
- if (m_statisticsStore)
- m_statisticsStore->grandfatherExistingWebsiteData([callbackAggregator = WTFMove(callbackAggregator)]() mutable { });
- else
- RELEASE_LOG(ResourceLoadStatistics, "WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent After being cleared, m_statisticsStore is null when trying to grandfather data.");
- }
- });
- }
+ m_statisticsStore->clear([this, protectedThis = protectedThis.copyRef(), shouldGrandfather, callbackAggregator = callbackAggregator.copyRef()] () mutable {
+ if (shouldGrandfather == ShouldGrandfatherStatistics::Yes) {
+ if (m_statisticsStore)
+ m_statisticsStore->grandfatherExistingWebsiteData([callbackAggregator = WTFMove(callbackAggregator)]() mutable { });
+ else
+ RELEASE_LOG(ResourceLoadStatistics, "WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent After being cleared, m_statisticsStore is null when trying to grandfather data.");
+ }
+ });
});
}