[webkit-reviews] review granted: [Bug 189938] [Apple Pay] Support granular errors in PaymentDetailsUpdate : [Attachment 350903] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 27 09:01:21 PDT 2018


youenn fablet <youennf at gmail.com> has granted Andy Estes <aestes at apple.com>'s
request for review:
Bug 189938: [Apple Pay] Support granular errors in PaymentDetailsUpdate
https://bugs.webkit.org/show_bug.cgi?id=189938

Attachment 350903: Patch

https://bugs.webkit.org/attachment.cgi?id=350903&action=review




--- Comment #4 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 350903
  --> https://bugs.webkit.org/attachment.cgi?id=350903
Patch

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

> Source/WebCore/Modules/applepay/ApplePayErrorCode.h:2
> + * Copyright (C) 2017-2018 Apple Inc. All rights reserved.

2018?

> Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:315
> +static inline void appendShippingContactInvalidError(String&& message,
std::optional<PaymentError::ContactField>&& contactField, Vector<PaymentError>&
errors)

If ContactField is an enum, I believe we go with std::optional<> without &&.

> Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:321
> +Vector<PaymentError> ApplePayPaymentHandler::computeErrors(String&& error,
AddressErrors&& addressErrors, PayerErrorFields&& payerErrors,
JSC::Strong<JSC::JSObject>&& paymentMethodErrors) const

Does paymentMethodErrors need to be a JSC::Strong, can we make it a
JSC::JSObject& instead?

> Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:357
> +		       errors.append({ applePayError->code(),
applePayError->message(), applePayError->contactField() });

We can probably move applePayError->message()


More information about the webkit-reviews mailing list