Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1d5116e8a1e7de5cb45e5dde4fe8973c9a17e949
      
https://github.com/WebKit/WebKit/commit/1d5116e8a1e7de5cb45e5dde4fe8973c9a17e949
  Author: Ben Nham <[email protected]>
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
    M Source/WebKit/webpushd/PushService.mm

  Log Message:
  -----------
  Re-check device lock state after registering for unlock notification in 
PushService
https://bugs.webkit.org/show_bug.cgi?id=273443
rdar://127258746

Reviewed by Brady Eidson.

In 277859@main I delayed webpushd initialization until the device unlocks at 
least once. However,
there is an issue in that patch: if the device unlocks between the time of the 
first unlock check
and the time we register for the notifyd notification, then the daemon would 
get stuck in a pending
unlock state forever. Fix this by re-checking whether the device has unlocked 
after registering for
the notifyd notification.

Also fixed some other minor issues:

 - performAfterFirstUnlock is only meant to be used on the main thread, so 
remove the dispatch_once
   call and simplify initialization.
 - make performing the delayed function more consistent--always run the passed 
in function via
   WorkQueue::dispatch rather than sometimes running it synchronously and 
sometimes running it on a
   new runloop turn.

* Source/WebKit/webpushd/PushService.mm:
(WebPushD::performAfterFirstUnlock):

Canonical link: https://commits.webkit.org/278176@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to