Changeset 237381 in webkit


Ignore:
Timestamp:
Oct 24, 2018 7:15:15 AM (5 years ago)
Author:
aestes@apple.com
Message:

[macOS Debug WK2] Layout Test http/tests/ssl/applepay/ApplePayShippingAddressChangeEventErrorsV3.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=190650
<rdar://problem/45341914>

Reviewed by Alex Christensen.

Source/WebCore:

In computeErrors, we intend to ignore errors when computing paymentMethodErrors. But we
weren't clearing exceptions generated from calling convert(), so they would end up being
logged as unhandled promise rejections.

Changed ApplePayPaymentHandler::computeErrors() to use a CatchScope to clear exceptions when
decoding paymentMethodErrors.

Also changed ApplePayShippingAddressChangeEventErrorsV3.https.html to catch promise
rejections from calling PaymentRequest.abort().

Covered by existing test.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::computeErrors const):

LayoutTests:

  • http/tests/resources/payment-request.js:

(updateDetailsOnShippingAddressChange):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r237376 r237381  
     12018-10-24  Andy Estes  <aestes@apple.com>
     2
     3        [macOS Debug WK2] Layout Test http/tests/ssl/applepay/ApplePayShippingAddressChangeEventErrorsV3.https.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=190650
     5        <rdar://problem/45341914>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * http/tests/resources/payment-request.js:
     10        (updateDetailsOnShippingAddressChange):
     11
    1122018-10-23  Jer Noble  <jer.noble@apple.com>
    213
  • trunk/LayoutTests/http/tests/resources/payment-request.js

    r236552 r237381  
    6969                detailsUpdatePromise.then(() => {
    7070                    resolve();
    71                     request.abort();
     71                    request.abort().catch(() => { });
    7272                });
    7373            };
  • trunk/Source/WebCore/ChangeLog

    r237379 r237381  
     12018-10-24  Andy Estes  <aestes@apple.com>
     2
     3        [macOS Debug WK2] Layout Test http/tests/ssl/applepay/ApplePayShippingAddressChangeEventErrorsV3.https.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=190650
     5        <rdar://problem/45341914>
     6
     7        Reviewed by Alex Christensen.
     8
     9        In computeErrors, we intend to ignore errors when computing paymentMethodErrors. But we
     10        weren't clearing exceptions generated from calling convert(), so they would end up being
     11        logged as unhandled promise rejections.
     12
     13        Changed ApplePayPaymentHandler::computeErrors() to use a CatchScope to clear exceptions when
     14        decoding paymentMethodErrors.
     15
     16        Also changed ApplePayShippingAddressChangeEventErrorsV3.https.html to catch promise
     17        rejections from calling PaymentRequest.abort().
     18
     19        Covered by existing test.
     20
     21        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
     22        (WebCore::ApplePayPaymentHandler::computeErrors const):
     23
    1242018-10-22  Antti Koivisto  <antti@apple.com>
    225
  • trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp

    r237142 r237381  
    364364    if (paymentMethodErrors) {
    365365        auto& context = *scriptExecutionContext();
    366         auto throwScope = DECLARE_THROW_SCOPE(context.vm());
     366        auto catchScope = DECLARE_CATCH_SCOPE(context.vm());
    367367        auto applePayErrors = convert<IDLSequence<IDLInterface<ApplePayError>>>(*context.execState(), paymentMethodErrors);
    368         if (!throwScope.exception()) {
     368        if (!catchScope.exception()) {
    369369            for (auto& applePayError : applePayErrors) {
    370370                if (applePayError)
    371371                    errors.append({ applePayError->code(), applePayError->message(), applePayError->contactField() });
    372372            }
    373         }
     373        } else
     374            catchScope.clearException();
    374375    }
    375376#else
Note: See TracChangeset for help on using the changeset viewer.