Title: [247748] trunk/Source/WebKit
Revision
247748
Author
[email protected]
Date
2019-07-23 14:56:34 -0700 (Tue, 23 Jul 2019)

Log Message

Get rid of unnecessary callback aggregators in WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=200042

Reviewed by Brent Fulgham.

Only 1 asynchronous function is called so there is nothing to "aggregate".

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdate):
(WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains):
(WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (247747 => 247748)


--- trunk/Source/WebKit/ChangeLog	2019-07-23 21:50:59 UTC (rev 247747)
+++ trunk/Source/WebKit/ChangeLog	2019-07-23 21:56:34 UTC (rev 247748)
@@ -1,3 +1,17 @@
+2019-07-23  Chris Dumez  <[email protected]>
+
+        Get rid of unnecessary callback aggregators in WebResourceLoadStatisticsStore
+        https://bugs.webkit.org/show_bug.cgi?id=200042
+
+        Reviewed by Brent Fulgham.
+
+        Only 1 asynchronous function is called so there is nothing to "aggregate".
+
+        * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+        (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdate):
+        (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains):
+        (WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains):
+
 2019-07-23  Zalan Bujtas  <[email protected]>
 
         [iOS] Tapping the search field on a search results page on zillow.com shows and immediately dismisses the keyboard

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (247747 => 247748)


--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-07-23 21:50:59 UTC (rev 247747)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-07-23 21:56:34 UTC (rev 247748)
@@ -813,12 +813,9 @@
             return;
         }
 
-        auto callbackAggregator = CallbackAggregator::create([completionHandler = WTFMove(completionHandler)] () mutable {
+        m_statisticsStore->updateCookieBlocking([completionHandler = WTFMove(completionHandler)]() mutable {
             postTaskReply(WTFMove(completionHandler));
         });
-        
-        if (m_statisticsStore)
-            m_statisticsStore->updateCookieBlocking([callbackAggregator = callbackAggregator.copyRef()]() { });
     });
 }
 
@@ -832,12 +829,9 @@
             return;
         }
 
-        auto callbackAggregator = CallbackAggregator::create([completionHandler = WTFMove(completionHandler)] () mutable {
+        m_statisticsStore->updateCookieBlockingForDomains(domainsToBlock, [completionHandler = WTFMove(completionHandler)]() mutable {
             postTaskReply(WTFMove(completionHandler));
         });
-
-        if (m_statisticsStore)
-            m_statisticsStore->updateCookieBlockingForDomains(domainsToBlock, [callbackAggregator = callbackAggregator.copyRef()]() { });
     });
 }
 
@@ -851,12 +845,9 @@
             return;
         }
 
-        auto callbackAggregator = CallbackAggregator::create([completionHandler = WTFMove(completionHandler)] () mutable {
+        m_statisticsStore->clearBlockingStateForDomains(domains, [completionHandler = WTFMove(completionHandler)]() mutable {
             postTaskReply(WTFMove(completionHandler));
         });
-
-        if (m_statisticsStore)
-            m_statisticsStore->clearBlockingStateForDomains(domains, [callbackAggregator = callbackAggregator.copyRef()]() { });
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to