New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 632708 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 587995



Sign in to add a comment

Add a timeout in case page doesn't call complete or if response.complete(true) throws exception

Project Member Reported by sanjoy....@samsung.com, Jul 29 2016

Issue description

If the page calls response.complete(true), blink throws "TypeError" but
current implementation in chrome waits for the complete("success") forever. 

https://www.w3.org/TR/payment-request/#complete
Though the spec does not say anything about this situation,
should we abort the request as if complete("fail") was called after a timeout?

 
Sounds good. Let's use 60 seconds again. Please remember to mark this "Started" if you start working on it.
Cc: -rouslan@chromium.org sanjoy....@samsung.com
Owner: rouslan@chromium.org
Status: Started (was: Assigned)
Work in progress at http://crrev.com/2192413002
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f981e164be677b2d201a715c5ca96236ee5ac0ab

commit f981e164be677b2d201a715c5ca96236ee5ac0ab
Author: rouslan <rouslan@chromium.org>
Date: Tue Aug 02 01:32:41 2016

Timeout if website never completes the transaction.

If the website does not call complete() within 60 seconds of show()
being resolved, behave as if complete("fail") has been called.

Also in this patch
 - Moved complete() related tests to CompleteTest.cpp.
 - Moved PaymentComple enum inside of PaymentCompleter.

BUG= 632708 
TEST=CompleteTest.RejectCompletePromiseAfterTimeout

Review-Url: https://codereview.chromium.org/2192413002
Cr-Commit-Position: refs/heads/master@{#409116}

[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/modules.gypi
[add] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/CompleteTest.cpp
[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/PaymentCompleter.h
[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/PaymentRequest.h
[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
[modify] https://crrev.com/f981e164be677b2d201a715c5ca96236ee5ac0ab/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ba9003c3da8ef31cf116ad1358e9fd32557f3be

commit 8ba9003c3da8ef31cf116ad1358e9fd32557f3be
Author: sanjoy.pal <sanjoy.pal@samsung.com>
Date: Tue Aug 09 03:17:39 2016

No need to stop the one shot timer once the timer fired.

BUG= 632708 
TEST=None (No behavior change)

Review-Url: https://codereview.chromium.org/2222503003
Cr-Commit-Position: refs/heads/master@{#410561}

[modify] https://crrev.com/8ba9003c3da8ef31cf116ad1358e9fd32557f3be/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Sign in to add a comment