| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| index 0070b15e67ec7fe5fa2eb600c16e12cd09be90df..f4586fc22f1be909a4e86d1ec7883c1ebddbfc0a 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
|
| @@ -326,6 +326,14 @@ public class PaymentRequestImpl
|
| recordSuccessFunnelHistograms("Initiated");
|
| }
|
|
|
| + protected void finalize() throws Throwable {
|
| + super.finalize();
|
| + if (mFormatter != null) {
|
| + // Ensures the native implementation of currency formatter does not leak.
|
| + mFormatter.destroy();
|
| + }
|
| + }
|
| +
|
| /**
|
| * Called by the merchant website to initialize the payment request data.
|
| */
|
| @@ -597,7 +605,7 @@ public class PaymentRequestImpl
|
|
|
| if (mFormatter == null) {
|
| mFormatter = new CurrencyStringFormatter(details.total.amount.currency,
|
| - Locale.getDefault());
|
| + details.total.amount.currencySystem, Locale.getDefault());
|
| }
|
|
|
| // Total is never pending.
|
|
|