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

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

Issue 2491513002: [Payment] Clean up PaymentResponse::toJSONForBinding (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
« 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/PaymentResponse.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
index 53762afa52fc495ed135d09503ac199486d20a0a..770b43830b7b7465d7bfd820e097de3882e37b19 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
@@ -41,20 +41,9 @@ ScriptValue PaymentResponse::toJSONForBinding(ScriptState* scriptState) const {
else
result.addNull("shippingAddress");
- if (shippingOption().isNull())
- result.addNull("shippingOption");
- else
- result.addString("shippingOption", shippingOption());
-
- if (payerEmail().isNull())
- result.addNull("payerEmail");
- else
- result.addString("payerEmail", payerEmail());
-
- if (payerPhone().isNull())
- result.addNull("payerPhone");
- else
- result.addString("payerPhone", payerPhone());
+ result.addStringOrNull("shippingOption", shippingOption())
+ .addStringOrNull("payerEmail", payerEmail())
+ .addStringOrNull("payerPhone", payerPhone());
please use gerrit instead 2016/11/09 18:55:17 You're missing payerName
return result.scriptValue();
}
« 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