Bug 233602

Summary: Correct serialization error in _WKApplicationManifestIcon
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit APIAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, hi, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=233715
Bug Depends on: 233350    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Brent Fulgham 2021-11-29 15:42:37 PST
In Bug 233350 I mistakenly set the NSSecureCoding classes for _WKApplicationManifestIcon's "purposes" property as an array of strings. However, this should be treated as an array of numbers.
Comment 1 Radar WebKit Bug Importer 2021-11-29 15:43:10 PST
<rdar://problem/85838843>
Comment 2 Brent Fulgham 2021-11-30 09:09:07 PST
To make matters worse, I was using an NSString to decode an NSURL, which obviously didn't work.

I've added a test case to exercise this code.
Comment 3 Brent Fulgham 2021-11-30 09:26:14 PST
Created attachment 445427 [details]
Patch
Comment 4 Devin Rousso 2021-11-30 10:27:42 PST
Comment on attachment 445427 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445427&action=review

r=me

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:379
> +    EXPECT_FALSE(error);

NIT: `EXPECT_NULL`?

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:382
> +    EXPECT_FALSE(error);

ditto (:379)
Comment 5 Brent Fulgham 2021-11-30 10:42:27 PST
Comment on attachment 445427 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445427&action=review

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:379
>> +    EXPECT_FALSE(error);
> 
> NIT: `EXPECT_NULL`?

Ah! Will do.

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:382
>> +    EXPECT_FALSE(error);
> 
> ditto (:379)

Ditto.
Comment 6 Brent Fulgham 2021-11-30 10:45:45 PST
Created attachment 445441 [details]
Patch for landing
Comment 7 EWS 2021-11-30 11:52:36 PST
Committed r286311 (244670@main): <https://commits.webkit.org/244670@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445441 [details].