Bug 212160 - [Apple Pay] Add new ApplePayInstallmentConfiguration members
Summary: [Apple Pay] Add new ApplePayInstallmentConfiguration members
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-20 11:59 PDT by Andy Estes
Modified: 2020-05-22 13:53 PDT (History)
10 users (show)

See Also:


Attachments
Patch (67.30 KB, patch)
2020-05-21 20:48 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (68.18 KB, patch)
2020-05-21 20:58 PDT, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>