DescriptionWeb payment shipping address/option timeout.
Before this patch, calling e.updateWith(new Promise((resolve) => {}));
would result in 'shippingoptionchange' and 'shippingaddresschange' never
timing out. This is because the timeout timer was being stopped in
updateWith() call.
The fix is to stop the timeout timer when the resolve() callback is
invoked instead of when updateWith() is called.
After this patch, calling e.updateWith(new Promise((resolve) => {}));
will timeout after 60 seconds.
To test manually:
1) Open https://rsolomakhin.github.io/pr/ko/promise/.
2) Click [Buy].
3) Change the shipping address or option.
Observe: The UI closes and the page shows an error message after 60
seconds.
The error message has been made more verbose as well: "Timed out waiting
for a response to a 'shippingaddresschange' event".
BUG=711691
TEST=PaymentRequestUpdateEventTest
Review-Url: https://codereview.chromium.org/2823393002
Cr-Commit-Position: refs/heads/master@{#465698}
Committed: https://chromium.googlesource.com/chromium/src/+/34f37c9993ce9bff9a5561d03d6b9fa29fa48bff
Patch Set 1 #
Messages
Total messages: 12 (8 generated)
|