| 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 495f73e805dc13310cd77b78dbb345844168c341..50029d323bdf717e491337a84dd95309cfa5aaa5 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| @@ -96,8 +96,6 @@ struct TypeConverter<PaymentDetailsModifierPtr, blink::PaymentDetailsModifier> {
|
|
|
| if (input.hasTotal())
|
| output->total = PaymentItem::From(input.total());
|
| - else
|
| - output->total = PaymentItem::New();
|
|
|
| if (input.hasAdditionalDisplayItems()) {
|
| for (size_t i = 0; i < input.additionalDisplayItems().size(); ++i) {
|
| @@ -273,7 +271,6 @@ void validatePaymentDetailsModifiers(
|
| return;
|
| }
|
|
|
| - HashSet<String> uniqueMethods;
|
| for (const auto& modifier : modifiers) {
|
| if (modifier.supportedMethods().isEmpty()) {
|
| exceptionState.throwTypeError(
|
| @@ -281,15 +278,6 @@ void validatePaymentDetailsModifiers(
|
| return;
|
| }
|
|
|
| - for (const auto& method : modifier.supportedMethods()) {
|
| - if (uniqueMethods.contains(method)) {
|
| - exceptionState.throwTypeError(
|
| - "Duplicate payment method identifiers are not allowed");
|
| - return;
|
| - }
|
| - uniqueMethods.add(method);
|
| - }
|
| -
|
| if (modifier.hasTotal()) {
|
| validateShippingOptionOrPaymentItem(modifier.total(), exceptionState);
|
| if (exceptionState.hadException())
|
| @@ -368,7 +356,6 @@ void validateAndConvertPaymentMethodData(
|
| return;
|
| }
|
|
|
| - HashSet<String> uniqueMethods;
|
| for (const auto& pmd : paymentMethodData) {
|
| if (pmd.supportedMethods().isEmpty()) {
|
| exceptionState.throwTypeError(
|
| @@ -376,15 +363,6 @@ void validateAndConvertPaymentMethodData(
|
| return;
|
| }
|
|
|
| - for (const auto& method : pmd.supportedMethods()) {
|
| - if (uniqueMethods.contains(method)) {
|
| - exceptionState.throwTypeError(
|
| - "Duplicate payment method identifiers are not allowed");
|
| - return;
|
| - }
|
| - uniqueMethods.add(method);
|
| - }
|
| -
|
| String stringifiedData = "";
|
| if (pmd.hasData() && !pmd.data().isEmpty()) {
|
| std::unique_ptr<JSONValue> value =
|
|
|