Skip to content

Commit f15ef69

Browse files
fix: complete() returns rejected promise (#732)
The current spec text read as if calling complete() twice would caused the interface to close down based on the second call. This just returns a rejected promise if the completeCalled is `true`.
1 parent 634a8a8 commit f15ef69

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,25 +3490,26 @@

34903490
arguments.
34913491
p>
34923492
<p data-tests="payment-response/complete-method-manual.https.html">
3493-
The <a>complete(result)a> method MUST act as follows:
3493+
The <a><code>complete(<var>resultvar>)code>a> method MUST act
3494+
as follows:
34943495
p>
34953496
<ol class="algorithm">
34963497
<li>Let <var>responsevar> be the <a>context objecta>.
34973498
li>
3499+
<li>If <var>responsevar>.<a>[[\complete]]a> is true, return <a>a
3500+
promise rejected witha> an "<a>InvalidStateErrora>"
3501+
<a>DOMExceptiona>.
3502+
li>
34983503
<li>Let <var>promisevar> be <a>a new promisea>.
34993504
li>
3500-
<li>If <var>responsevar>.<a>[[\complete]]a> is true, reject <var>
3501-
promisevar> with an "<a>InvalidStateErrora>"
3502-
<a>DOMExceptiona>.
3505+
<li>Set <var>responsevar>.<a>[[\complete]]a> to true.
35033506
li>
35043507
<li data-tests=
35053508
"payment-request/payment-response/retry-method-manual.https.html">If
35063509
<var>responsevar>.<a>[[\retryPromise]]a> is not null, reject
35073510
<var>promisevar> with an "<a>InvalidStateErrora>"
35083511
<a>DOMExceptiona>.
35093512
li>
3510-
<li>Otherwise, set <var>responsevar>.<a>[[\complete]]a> to true.
3511-
li>
35123513
<li>Return <var>promisevar> and perform the remaining steps <a>in
35133514
parallela>.
35143515
li>

0 commit comments

Comments
 (0)