| 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 b95ffbc73e78ad554263a5618b1f9cd8e47266af..e076df91fa795604ff8c6a655d3c889b22f54889 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
|
| @@ -472,7 +472,7 @@
|
| */
|
| @Override
|
| public void abort() {
|
| - closeClient();
|
| + mClient = null;
|
| closeUI(false);
|
| }
|
|
|
| @@ -489,7 +489,7 @@
|
| */
|
| @Override
|
| public void close() {
|
| - closeClient();
|
| + mClient = null;
|
| closeUI(false);
|
| }
|
|
|
| @@ -498,7 +498,7 @@
|
| */
|
| @Override
|
| public void onConnectionError(MojoException e) {
|
| - closeClient();
|
| + mClient = null;
|
| closeUI(false);
|
| }
|
|
|
| @@ -570,7 +570,7 @@
|
| private void disconnectFromClientWithDebugMessage(String debugMessage) {
|
| Log.d(TAG, debugMessage);
|
| mClient.onError();
|
| - closeClient();
|
| + mClient = null;
|
| }
|
|
|
| /**
|
| @@ -581,8 +581,9 @@
|
| mUI.close(paymentSuccess, new Runnable() {
|
| @Override
|
| public void run() {
|
| - if (mClient != null) mClient.onComplete();
|
| - closeClient();
|
| + if (mClient == null) return;
|
| + mClient.onComplete();
|
| + mClient = null;
|
| }
|
| });
|
| mUI = null;
|
| @@ -597,9 +598,4 @@
|
| mPaymentMethods = null;
|
| }
|
| }
|
| -
|
| - private void closeClient() {
|
| - if (mClient != null) mClient.close();
|
| - mClient = null;
|
| - }
|
| }
|
|
|