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

Unified Diff: components/payments/content/payment_request_spec.cc

Issue 2808883002: [Payments] Fix bug in shipping option selection. (Closed)
Patch Set: Initial 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 | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request_spec.cc
diff --git a/components/payments/content/payment_request_spec.cc b/components/payments/content/payment_request_spec.cc
index a3e8322571d6c762b967b06971c3d7a6fda8bb95..bec17e27c30289c3bf12b8a92d23a2122d1c1e19 100644
--- a/components/payments/content/payment_request_spec.cc
+++ b/components/payments/content/payment_request_spec.cc
@@ -178,6 +178,10 @@ void PaymentRequestSpec::UpdateSelectedShippingOption() {
});
if (selected_shipping_option_it != details().shipping_options.rend()) {
selected_shipping_option_ = selected_shipping_option_it->get();
+ } else {
+ // It's possible that there is no selected shipping option.
+ // TODO(crbug.com/710004): Show an error in this case.
+ selected_shipping_option_ = nullptr;
}
}
« no previous file with comments | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698