Title: [273394] branches/safari-611-branch/Source/WebKit
Revision
273394
Author
repst...@apple.com
Date
2021-02-24 09:10:23 -0800 (Wed, 24 Feb 2021)

Log Message

Cherry-pick r273180. rdar://problem/74623601

    CrashTracer: com.apple.WebKit.Networking at WebKit: WTF::Detail::CallableWrapper<WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests()
    https://bugs.webkit.org/show_bug.cgi?id=222201

    Patch by Alex Christensen <achristen...@webkit.org> on 2021-02-19
    Reviewed by Chris Dumez.

    * NetworkProcess/PrivateClickMeasurementManager.cpp:
    (WebKit::PrivateClickMeasurementManager::attribute):
    (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273180 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/WebKit/ChangeLog (273393 => 273394)


--- branches/safari-611-branch/Source/WebKit/ChangeLog	2021-02-24 17:10:20 UTC (rev 273393)
+++ branches/safari-611-branch/Source/WebKit/ChangeLog	2021-02-24 17:10:23 UTC (rev 273394)
@@ -1,3 +1,30 @@
+2021-02-23  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r273180. rdar://problem/74623601
+
+    CrashTracer: com.apple.WebKit.Networking at WebKit: WTF::Detail::CallableWrapper<WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests()
+    https://bugs.webkit.org/show_bug.cgi?id=222201
+    
+    Patch by Alex Christensen <achristen...@webkit.org> on 2021-02-19
+    Reviewed by Chris Dumez.
+    
+    * NetworkProcess/PrivateClickMeasurementManager.cpp:
+    (WebKit::PrivateClickMeasurementManager::attribute):
+    (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-19  Alex Christensen  <achristen...@webkit.org>
+
+            CrashTracer: com.apple.WebKit.Networking at WebKit: WTF::Detail::CallableWrapper<WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests()
+            https://bugs.webkit.org/show_bug.cgi?id=222201
+
+            Reviewed by Chris Dumez.
+
+            * NetworkProcess/PrivateClickMeasurementManager.cpp:
+            (WebKit::PrivateClickMeasurementManager::attribute):
+            (WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
+
 2021-02-18  Ruben Turcios  <rubent...@apple.com>
 
         Cherry-pick r272355. rdar://problem/74032694

Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp (273393 => 273394)


--- branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp	2021-02-24 17:10:20 UTC (rev 273393)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp	2021-02-24 17:10:23 UTC (rev 273394)
@@ -113,7 +113,9 @@
         return;
 
     if (auto* resourceLoadStatistics = m_networkSession->resourceLoadStatistics()) {
-        resourceLoadStatistics->attributePrivateClickMeasurement(sourceSite, attributeOnSite, WTFMove(attributionTriggerData), [this] (auto optionalSecondsUntilSend) {
+        resourceLoadStatistics->attributePrivateClickMeasurement(sourceSite, attributeOnSite, WTFMove(attributionTriggerData), [this, weakThis = makeWeakPtr(*this)] (auto optionalSecondsUntilSend) {
+            if (!weakThis)
+                return;
             if (optionalSecondsUntilSend) {
                 auto secondsUntilSend = *optionalSecondsUntilSend;
                 if (m_firePendingAttributionRequestsTimer.isActive() && m_firePendingAttributionRequestsTimer.nextFireInterval() < secondsUntilSend)
@@ -198,7 +200,9 @@
     if (!resourceLoadStatistics)
         return;
 
-    resourceLoadStatistics->allAttributedPrivateClickMeasurement([this] (auto&& attributions) {
+    resourceLoadStatistics->allAttributedPrivateClickMeasurement([this, weakThis = makeWeakPtr(*this)] (auto&& attributions) {
+        if (!weakThis)
+            return;
         auto nextTimeToFire = Seconds::infinity();
         Vector<PrivateClickMeasurement> sentAttributions;
         
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to