Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0157ffa26fb13240224fc8b803e94ca04a315da0
      
https://github.com/WebKit/WebKit/commit/0157ffa26fb13240224fc8b803e94ca04a315da0
  Author: Frédéric Wang <[email protected]>
  Date:   2025-09-26 (Fri, 26 Sep 2025)

  Changed paths:
    M Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations
    M Source/WebKit/webpushd/MockPushServiceConnection.mm
    M Source/WebKit/webpushd/WebPushDaemon.h
    M Source/WebKit/webpushd/WebPushDaemon.mm
    M Source/WebKit/webpushd/WebPushDaemonMain.mm
    M Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm

  Log Message:
  -----------
  Fix remaining smart pointer errors in webpushd
https://bugs.webkit.org/show_bug.cgi?id=299368

Reviewed by Chris Dumez.

Note: The remaining errors for _WKMockUserNotificationCenter.mm is a
false positive due to the checker not recognizing _init*
See https://github.com/llvm/llvm-project/pull/160569

* Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations: 
Update expectations.
* Source/WebKit/webpushd/MockPushServiceConnection.mm:
(WebPushD::MockPushServiceConnection::subscribe): Use nil to turn off false 
positive warning.
* Source/WebKit/webpushd/WebPushDaemon.h: Make m_userNotificationCenterClass a 
RetainPtr.
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::handleIncomingPush): Ditto.
(WebPushD::WebPushDaemon::subscribeToPushService): Ditto.
(WebPushD::WebPushDaemon::showNotification): Ditto. Also wrap an arg in a 
RetainPtr.
(WebPushD::WebPushDaemon::getNotifications): Make m_userNotificationCenterClass 
a RetainPtr.
(WebPushD::WebPushDaemon::cancelNotification): Ditto.
(WebPushD::WebPushDaemon::getPushPermissionState): Ditto.
(WebPushD::WebPushDaemon::requestPushPermission): Ditto.
(WebPushD::WebPushDaemon::setAppBadge): Ditto.
(WebPushD::WebPushDaemon::getAppBadgeForTesting): Ditto.
* Source/WebKit/webpushd/WebPushDaemonMain.mm: Use a RetainPtr for the result 
of NSSearchPathForDirectoriesInDomains.
(WebKit::getWebPushDirectoryPathWithMigrationIfNecessary):
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm:
(+[_WKMockUserNotificationCenter _internalInitWithBundleIdentifier:]):
  Use a retainPtr for a DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL arg, which 
calls dispatch_queue_attr_make_with_autorelease_frequency.

Canonical link: https://commits.webkit.org/300566@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