Bug 256438

Summary: REGRESSION (244460@main): Stop using RetainPtr<>::autorelease() in createNSArray() lambda
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit Misc.Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 233350    
Bug Blocks:    

Description David Kilzer (:ddkilzer) 2023-05-07 20:09:34 PDT
Stop using RetainPtr<>::autorelease() in createNSArray() lambda.

This is not necessary:

- (NSArray<_WKApplicationManifestIcon *> *)icons
{
    return createNSArray(_applicationManifest->applicationManifest().icons, [] (auto& coreIcon) -> id {
        return adoptNS([[_WKApplicationManifestIcon alloc] initWithCoreIcon:&coreIcon]).autorelease();
    }).autorelease();
}

in Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.mm.

Regressed in:

    Add support for web app manifest icons in WebKit/UI Process layer
    <https://bugs.webkit.org/show_bug.cgi?id=233350>
    <rdar://problem/84311569>
    <https://commits.webkit.org/244460@main>
Comment 1 Radar WebKit Bug Importer 2023-05-07 20:11:01 PDT
<rdar://problem/109022629>
Comment 2 David Kilzer (:ddkilzer) 2023-05-07 20:16:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13559
Comment 3 EWS 2023-05-08 01:21:41 PDT
Committed 263786@main (d57e039ea711): <https://commits.webkit.org/263786@main>

Reviewed commits have been landed. Closing PR #13559 and removing active labels.