Bug 212160

Summary: [Apple Pay] Add new ApplePayInstallmentConfiguration members
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, cdumez, cmarcelo, esprehn+autocc, ews-watchlist, kondapallykalyan, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andy Estes 2020-05-20 11:59:47 PDT
[Apple Pay] Add new ApplePayInstallmentConfiguration members
Comment 1 Andy Estes 2020-05-20 12:00:02 PDT
rdar://problem/60703650
Comment 2 Andy Estes 2020-05-21 20:48:15 PDT Comment hidden (obsolete)
Comment 3 Andy Estes 2020-05-21 20:58:42 PDT
Created attachment 400022 [details]
Patch
Comment 4 Alex Christensen 2020-05-22 11:13:14 PDT
Comment on attachment 400022 [details]
Patch

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

> Source/WebCore/Modules/applepay/PaymentInstallmentConfiguration.mm:217
> +        applicationMetadataDictionary = dynamic_objc_cast<NSDictionary>([NSJSONSerialization JSONObjectWithData:applicationMetadata options:0 error:nil]);

Maybe we should pass an NSError** and return an exception here?
Comment 5 Andy Estes 2020-05-22 11:58:41 PDT
Comment on attachment 400022 [details]
Patch

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

>> Source/WebCore/Modules/applepay/PaymentInstallmentConfiguration.mm:217
>> +        applicationMetadataDictionary = dynamic_objc_cast<NSDictionary>([NSJSONSerialization JSONObjectWithData:applicationMetadata options:0 error:nil]);
> 
> Maybe we should pass an NSError** and return an exception here?

-JSONObjectWithData:options:error: returns nil when an error occurs, so we will already return an exception in that case (as well as when the call succeeds but the JSON root value isn’t an object). Passing an NSError would let us include more diagnostic information in the Exception message, but I’m not sure we want to expose Foundation's error messages on the web.
Comment 6 EWS 2020-05-22 13:10:05 PDT
Committed r262069: <https://trac.webkit.org/changeset/262069>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400022 [details].
Comment 7 Andy Estes 2020-05-22 13:53:35 PDT
Fixed the build in r262072: <https://trac.webkit.org/changeset/262072>