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

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

Issue 2825333004: Improve error message for PaymentRequest.abort(). (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | 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 e517e71e3e26d6b59b090553dcefd9581db49931..993ba7cd967f4ba91b15c5f6f49d89edeb1403ea 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -1040,12 +1040,14 @@ void PaymentRequest::OnAbort(bool aborted_successfully) {
DCHECK(show_resolver_);
if (!aborted_successfully) {
- abort_resolver_->Reject(DOMException::Create(kInvalidStateError));
+ abort_resolver_->Reject(DOMException::Create(
+ kInvalidStateError, "Unable to abort the payment"));
abort_resolver_.Clear();
return;
}
- show_resolver_->Reject(DOMException::Create(kAbortError));
+ show_resolver_->Reject(
+ DOMException::Create(kAbortError, "The website has aborted the payment"));
abort_resolver_->Resolve();
ClearResolversAndCloseMojoConnection();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698