Bug 188954 - [Apple Pay] PaymentRequest.show() should reject when an unsupported ApplePayRequest version is specified
Summary: [Apple Pay] PaymentRequest.show() should reject when an unsupported ApplePayR...
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: 2018-08-26 11:52 PDT by Andy Estes
Modified: 2018-08-29 19:27 PDT (History)
8 users (show)

See Also:


Attachments
Patch (6.53 KB, patch)
2018-08-26 11:58 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (6.66 KB, patch)
2018-08-26 17:55 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 2018-08-26 11:52:50 PDT
[Apple Pay] PaymentRequest.show() should reject when an unsupported ApplePayRequest version is specified
Comment 1 Andy Estes 2018-08-26 11:58:46 PDT
Created attachment 348098 [details]
Patch
Comment 2 Darin Adler 2018-08-26 13:58:18 PDT
Comment on attachment 348098 [details]
Patch

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

> Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp:55
> +        return Exception { InvalidAccessError, makeString("\"", String::number(version), "\" is not a supported version.") };

We should not need the String::number here as long as we include the StringConcatenateNumbers.h header. Doing it with an explicit call to String::number makes slower, larger code so we shouldn’t do it. I realize now you are just moving this code, but consider fixing it while moving it.
Comment 3 Andy Estes 2018-08-26 17:55:12 PDT
Created attachment 348106 [details]
Patch
Comment 4 WebKit Commit Bot 2018-08-26 18:39:58 PDT
Comment on attachment 348106 [details]
Patch

Clearing flags on attachment: 348106

Committed r235342: <https://trac.webkit.org/changeset/235342>
Comment 5 WebKit Commit Bot 2018-08-26 18:39:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-08-26 18:40:16 PDT
<rdar://problem/43739375>
Comment 7 Darin Adler 2018-08-28 20:38:09 PDT
Comment on attachment 348106 [details]
Patch

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

> Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp:56
> +        return Exception { InvalidAccessError, makeString("\"", version, "\" is not a supported version.") };

Missed another opportunity to slightly improve the makeString call. We could use '"' instead of "\"" for the first argument and it’s possibly going to be ever so slightly more efficient.
Comment 8 Andy Estes 2018-08-29 19:27:18 PDT
(In reply to Darin Adler from comment #7)
> Missed another opportunity to slightly improve the makeString call. We could
> use '"' instead of "\"" for the first argument and it’s possibly going to be
> ever so slightly more efficient.

Fixed in r235494: <https://trac.webkit.org/changeset/235494>.