Closed Bug 1443914 Opened 7 years ago Closed 7 years ago

Stale shipping options are passed to the front-end after an .updateWith() with no shipping options

Categories

(Core :: DOM: Web Payments, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: MattN, Assigned: chenyu.chuang)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webpayments])

Attachments

(2 files, 2 obsolete files)

If updateWith is called with no shippingOptions property after there were shipping options, it seems like the shipping options in the parent process (not sure about content process) don't get cleared. Demo: https://googlechrome.github.io/samples/paymentrequest/dynamic-shipping/ * (Remove the legacy `supportedMethods` syntax in the `supportedInstruments` array: ```js { supportedMethods: networks, }, ``` ) There is a TODO in the code that mentions that there is more to do with shippingOptions for updates: https://dxr.mozilla.org/mozilla-central/rev/bccdc684210431c233622650a91454c09f6af9eb/dom/payments/PaymentRequestManager.cpp#546,556
Flags: in-testsuite?
Priority: P1 → P2
Whiteboard: [webpayments]
The root cause is the spec update, in the old spec, the old values would be kept if they are not in the new details. I will write a patch according to this spec update. Could someone assign this bug to me? thanks.
Thank you for taking this.
Assignee: nobody → chenyu.chuang
Status: NEW → ASSIGNED
Priority: P2 → P1
Update the implementation according to the spec update. Force updating the saved PaymentDetails when requestShipping is true, even the data(shippingOptions) doesn't present in the DetailsUpdate.
Attachment #8963615 - Flags: review?(amarchesini)
Attachment #8963618 - Flags: review?(amarchesini) → review+
Attachment #8963615 - Flags: review?(amarchesini) → review+
Hi Baku, thank you for the fast review. :)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/200ba8d29892 Force updating PaymentDetails when requestShipping is true. r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/1ce3dc676ee9 Mochitest for force updating PaymentDetails. r=baku
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: