Chromium Code Reviews| Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| index daefaf1c27e6b85e2f73c158c4e3d463d84589e0..a3f303284fa39c777fd08dd1fb1e79a29cad0101 100644 |
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| @@ -475,6 +475,18 @@ void PaymentRequest::OnPaymentResponse(mojom::blink::PaymentResponsePtr response |
| } |
| } |
| + if (m_options.requestPayerEmail() && response->payer_email.isEmpty()) { |
| + m_showResolver->reject(DOMException::create(SyntaxError)); |
| + clearResolversAndCloseMojoConnection(); |
| + return; |
| + } |
|
please use gerrit instead
2016/06/10 17:46:51
Let's follow the convention of the shipping addres
|
| + |
| + if (m_options.requestPayerPhone() && response->payer_phone.isEmpty()) { |
| + m_showResolver->reject(DOMException::create(SyntaxError)); |
| + clearResolversAndCloseMojoConnection(); |
| + return; |
| + } |
| + |
| m_showResolver->resolve(new PaymentResponse(std::move(response), this)); |
| // Do not close the mojo connection here. The merchant website should call |