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

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

Issue 2532953006: Throw if PaymentRequest() built with 'error' message (Closed)
Patch Set: Created 4 years, 1 month 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
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 10dc9a605e61d45e4a642548af1f2ae46f80e0c5..018a1055b723731007241e03c9ba1486482cb989 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -750,8 +750,8 @@ PaymentRequest::PaymentRequest(ScriptState* scriptState,
if (exceptionState.hadException())
return;
- if (details.hasError() && !details.error().isEmpty()) {
- exceptionState.throwTypeError("Error value should be empty");
+ if (details.hasError()) {
+ exceptionState.throwTypeError("Error message not allowed in constructor");
return;
}

Powered by Google App Engine
This is Rietveld 408576698