Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Issue 2823393002: Web payment shipping address/option timeout. (Closed)

Created:
3 years, 8 months ago by please use gerrit instead
Modified:
3 years, 8 months ago
CC:
blink-reviews, chromium-reviews, gogerald+paymentswatch_chromium.org, haraken, mahmadi+paymentswatch_chromium.org, mattgaunt+fyi_chromium.org, rouslan+payments_chromium.org, sebsg+paymentswatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Web 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -18 lines) Patch
M third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.h View 3 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp View 3 chunks +26 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp View 2 chunks +106 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (8 generated)
please use gerrit instead
Marijn, ptal.
3 years, 8 months ago (2017-04-18 20:51:33 UTC) #4
Marijn Kruisselbrink
lgtm
3 years, 8 months ago (2017-04-19 18:55:29 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2823393002/1
3 years, 8 months ago (2017-04-19 19:07:24 UTC) #9
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 19:14:47 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/34f37c9993ce9bff9a5561d03d6b...

Powered by Google App Engine
This is Rietveld 408576698