[webkit-reviews] review granted: [Bug 190058] [Payment Request] Implement MerchantValidationEvent.methodName : [Attachment 351014] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 28 17:35:09 PDT 2018
Darin Adler <darin at apple.com> has granted Andy Estes <aestes at apple.com>'s
request for review:
Bug 190058: [Payment Request] Implement MerchantValidationEvent.methodName
https://bugs.webkit.org/show_bug.cgi?id=190058
Attachment 351014: Patch
https://bugs.webkit.org/attachment.cgi?id=351014&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 351014
--> https://bugs.webkit.org/attachment.cgi?id=351014
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=351014&action=review
> Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:486
> +
m_paymentRequest->dispatchEvent(MerchantValidationEvent::create(eventNames().me
rchantvalidationEvent, WTF::get<URL>(m_identifier).string(),
WTFMove(validationURL)).get());
I must admit I don’t understand why it’s guaranteed that m_identifier is a URL,
and not some other type. But I do see this idiom elsewhere in the class so it
must be OK.
> Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.cpp:49
> + if (!methodName.isEmpty() &&
!convertAndValidatePaymentMethodIdentifier(methodName))
> + return Exception { RangeError, makeString('"', methodName, "\" is an
invalid payment method identifier.") };
If convertAndValidatePaymentMethodIdentifier is used elsewhere, I wonder if
this exception is also needed elsewhere. Could share the code.
More information about the webkit-reviews
mailing list