Changeset 202499 in webkit


Ignore:
Timestamp:
Jun 27, 2016 11:28:00 AM (8 years ago)
Author:
andersca@apple.com
Message:

No error message when passing an invalid API version to ApplePaySession constructor
https://bugs.webkit.org/show_bug.cgi?id=159154

Reviewed by Tim Horton.

Log an error message if the version is not supported. Also, check for version 0 since that is also not supported.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::create):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r202497 r202499  
     12016-06-27  Anders Carlsson  <andersca@apple.com>
     2
     3        No error message when passing an invalid API version to ApplePaySession constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=159154
     5
     6        Reviewed by Tim Horton.
     7
     8        Log an error message if the version is not supported. Also, check for version 0 since that is also not supported.
     9
     10        * Modules/applepay/ApplePaySession.cpp:
     11        (WebCore::ApplePaySession::create):
     12
    1132016-06-27  Joanmarie Diggs  <jdiggs@igalia.com>
    214
  • trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp

    r202409 r202499  
    650650    auto& paymentCoordinator = document.frame()->mainFrame().paymentCoordinator();
    651651
    652     if (!paymentCoordinator.supportsVersion(version)) {
     652    if (!version || !paymentCoordinator.supportsVersion(version)) {
     653        window.printErrorMessage(makeString("\"" + String::number(version), "\" is not a supported version."));
    653654        ec = INVALID_ACCESS_ERR;
    654655        return nullptr;
Note: See TracChangeset for help on using the changeset viewer.