Closed Bug 1615630 Opened 5 years ago Closed 5 years ago

Error handling in PaymentRequestManager::RespondPayment doesn't make sense

Categories

(Core :: DOM: Web Payments, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: bzbarsky, Assigned: edenchuang)

Details

Attachments

(1 file)

In the IPCPaymentActionResponse::TIPCPaymentShowActionResponse case, the code does:

      aRequest->RespondShowPayment(response.methodName(), responseData,
                                   response.payerName(), response.payerEmail(),
                                   response.payerPhone(), rejectedReason);
      if (rejectedReason.Failed()) {
        NotifyRequestDone(aRequest);
      }

But RespondShowPayment consumes the failure on rejectedReason; after that call that reason never tests true for Failed(). So that NotifyRequestDone call is never reached. Should it be, if rejectedReason was a failure before the call to RespondShowPayment?

Priority: -- → P2
Assignee: nobody → echuang
Attachment #9131412 - Attachment description: Bug 1615630 - Close PaymentRequestChild if the PaymentRequest.show() result is not PAYMENT_ACCEPTED → Bug 1615630 - Call PaymentRequestManager::NotifyRequestDone() when PaymentShowActionResponse.status() is not PAYMENT_ACCEPTED before calling PaymentRequest::RespondShowPayment
Pushed by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/85cd7053db6d Call PaymentRequestManager::NotifyRequestDone() when PaymentShowActionResponse.status() is not PAYMENT_ACCEPTED before calling PaymentRequest::RespondShowPayment r=baku,alchen
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: