You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://bugs.webkit.org/show_bug.cgi?id=299368
Reviewed by NOBODY (OOPS!).
Note: The remaining RetainPtrCtorAdoptCheckerExpectations error for
_WKMockUserNotificationCenter.mm is a false positive due to the checker
not recognizing _init* (llvm/llvm-project#160569).
* Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations: Ditto.
* 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.
if (settings.authorizationStatus != UNAuthorizationStatusAuthorized) {
855
855
WEBPUSHDAEMON_RELEASE_LOG(Push, "Cannot subscribe because web clip origin %{sensitive}s does not have correct permissions", origin.toString().utf8().data());
content.get().subtitle = adoptNS([[NSStringalloc] initWithFormat:WEB_UI_STRING("from %@", "Web Push Notification string to indicate the name of the Web App/Web Site a notification was sent from, such as 'from Wikipedia'").createNSString().get(), notificationSourceForDisplay]).get();
RetainPtr<UNUserNotificationCenter> center = adoptNS([[m_userNotificationCenterClass alloc] initWithBundleIdentifier:notificationCenterBundleIdentifier.get()]);
1042
+
RetainPtr<UNUserNotificationCenter> center = adoptNS([[m_userNotificationCenterClass.get()alloc] initWithBundleIdentifier:notificationCenterBundleIdentifier.get()]);
1043
1043
if (!center)
1044
1044
RELEASE_LOG_ERROR(Push, "Failed to instantiate UNUserNotificationCenter center");
0 commit comments