Bug 159154 - No error message when passing an invalid API version to ApplePaySession constructor
Summary: No error message when passing an invalid API version to ApplePaySession const...
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: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 11:04 PDT by Anders Carlsson
Modified: 2019-07-18 16:38 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.64 KB, patch)
2016-06-27 11:05 PDT, Anders Carlsson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2016-06-27 11:04:53 PDT
No error message when passing an invalid API version to ApplePaySession constructor
Comment 1 Anders Carlsson 2016-06-27 11:05:35 PDT
Created attachment 282143 [details]
Patch
Comment 2 Tim Horton 2016-06-27 11:07:05 PDT
Comment on attachment 282143 [details]
Patch

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

> Source/WebCore/Modules/applepay/ApplePaySession.cpp:652
> +    if (!version || !paymentCoordinator.supportsVersion(version)) {

Why does supportsVersion not return false for version=0?
Comment 3 Anders Carlsson 2016-06-27 11:26:58 PDT
(In reply to comment #2)
> Comment on attachment 282143 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282143&action=review
> 
> > Source/WebCore/Modules/applepay/ApplePaySession.cpp:652
> > +    if (!version || !paymentCoordinator.supportsVersion(version)) {
> 
> Why does supportsVersion not return false for version=0?

supportsVersion throws an exception if you pass 0 since it's out of range.
Comment 4 Anders Carlsson 2016-06-27 11:28:19 PDT
Committed r202499: <http://trac.webkit.org/changeset/202499>