Title: [291465] trunk/Source/WebKit
Revision
291465
Author
[email protected]
Date
2022-03-17 20:17:19 -0700 (Thu, 17 Mar 2022)

Log Message

Call doDailyActivityInManager on main thread in adattributiond
https://bugs.webkit.org/show_bug.cgi?id=238059
<rdar://90335028>

Patch by Alex Christensen <[email protected]> on 2022-03-17
Reviewed by Tim Horton.

It turns out that xpc activities don't happen on the main thread.
Everything else in adattributiond happens on the main thread (except database operations)
and to be thread safe this also needs to happen on the main thread.

* Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:
(WebKit::registerScheduledActivityHandler):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (291464 => 291465)


--- trunk/Source/WebKit/ChangeLog	2022-03-18 02:33:37 UTC (rev 291464)
+++ trunk/Source/WebKit/ChangeLog	2022-03-18 03:17:19 UTC (rev 291465)
@@ -1,3 +1,18 @@
+2022-03-17  Alex Christensen  <[email protected]>
+
+        Call doDailyActivityInManager on main thread in adattributiond
+        https://bugs.webkit.org/show_bug.cgi?id=238059
+        <rdar://90335028>
+
+        Reviewed by Tim Horton.
+
+        It turns out that xpc activities don't happen on the main thread.
+        Everything else in adattributiond happens on the main thread (except database operations)
+        and to be thread safe this also needs to happen on the main thread.
+
+        * Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:
+        (WebKit::registerScheduledActivityHandler):
+
 2022-03-17  Aditya Keerthi  <[email protected]>
 
         [iOS] Support PDF search when using a find interaction

Modified: trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm (291464 => 291465)


--- trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm	2022-03-18 02:33:37 UTC (rev 291464)
+++ trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm	2022-03-18 03:17:19 UTC (rev 291465)
@@ -98,8 +98,10 @@
             return;
         }
 
-        NSLog(@"XPC activity happening");
-        PCM::doDailyActivityInManager();
+        dispatch_async(dispatch_get_main_queue(), ^{
+            NSLog(@"XPC activity happening");
+            PCM::doDailyActivityInManager();
+        });
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to