Bug 1497110 - remove currencySystem from PaymentRequest. r=edenchuang, peterv
authorMarcos Cáceres <mcaceres@mozilla.com>
Sun, 07 Oct 2018 21:00:00 +0300
changeset 499961 26d29ab41cdf753774f2d7ccdc0a7b460a5528cc
parent 499960 31ceac3c03fc21c6a53cf667844ffbfe5caad0d9
child 499962 2a75c991871634b64f4dbf179130be4d279f521d
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedenchuang, peterv
bugs1497110
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1497110 - remove currencySystem from PaymentRequest. r=edenchuang, peterv
dom/payments/PaymentRequest.cpp
dom/webidl/PaymentRequest.webidl
--- a/dom/payments/PaymentRequest.cpp
+++ b/dom/payments/PaymentRequest.cpp
@@ -398,25 +398,16 @@ PaymentRequest::IsValidCurrency(const ns
 
 nsresult
 PaymentRequest::IsValidCurrencyAmount(const nsAString& aItem,
                                       const PaymentCurrencyAmount& aAmount,
                                       const bool aIsTotalItem,
                                       nsAString& aErrorMsg)
 {
   nsresult rv;
-  // currencySystem must equal urn:iso:std:iso:4217
-  if (!aAmount.mCurrencySystem.EqualsASCII("urn:iso:std:iso:4217")) {
-    aErrorMsg.AssignLiteral("The amount.currencySystem of \"");
-    aErrorMsg.Append(aItem);
-    aErrorMsg.AppendLiteral("\"(");
-    aErrorMsg.Append(aAmount.mCurrencySystem);
-    aErrorMsg.AppendLiteral(") must equal urn:iso:std:iso:4217.");
-    return NS_ERROR_RANGE_ERR;
-  }
   rv = IsValidCurrency(aItem, aAmount.mCurrency, aErrorMsg);
   if (NS_FAILED(rv)) {
     return rv;
   }
   if (aIsTotalItem) {
     rv = IsNonNegativeNumber(aItem, aAmount.mValue, aErrorMsg);
     if (NS_FAILED(rv)) {
       return rv;
--- a/dom/webidl/PaymentRequest.webidl
+++ b/dom/webidl/PaymentRequest.webidl
@@ -13,17 +13,16 @@
 dictionary PaymentMethodData {
   required DOMString           supportedMethods;
            object              data;
 };
 
 dictionary PaymentCurrencyAmount {
   required DOMString currency;
   required DOMString value;
-           DOMString currencySystem = "urn:iso:std:iso:4217";
 };
 
 enum PaymentItemType {
   "tax"
 };
 
 dictionary PaymentItem {
   required DOMString             label;