Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(918)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2163193002: Reject payment request with AbortError if web page rejects promise from updateWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 89688e55f750994fe814e767b3057412d81cb4bc..697077558264391a19d958fd976005c5a4c77195 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -458,10 +458,13 @@ void PaymentRequest::onUpdatePaymentDetails(const ScriptValue& detailsScriptValu
void PaymentRequest::onUpdatePaymentDetailsFailure(const ScriptValue& error)
{
+ String message;
+ error.toString(message);
+
if (m_showResolver)
- m_showResolver->reject(error);
+ m_showResolver->reject(DOMException::create(AbortError, message));
if (m_completeResolver)
- m_completeResolver->reject(error);
+ m_completeResolver->reject(DOMException::create(AbortError, message));
clearResolversAndCloseMojoConnection();
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698