Re: [w3c/payment-request] Retry request abort the update (#723)

domenic requested changes on this pull request.

I'm a bit confused as to why this algorithm sets complete to true but the "user aborts the payment request algorithm" does not.

> @@ -4545,7 +4545,20 @@ <h2>
                 <li>Set <var>request</var>.<a>[[\state]]</a> to
                 "<a>closed</a>".
                 </li>
-                <li>Reject the promise
+                <li>If <var>request</var><a>[[\response]]</a> is not null,

Missing dot

> @@ -4545,7 +4545,20 @@ <h2>
                 <li>Set <var>request</var>.<a>[[\state]]</a> to
                 "<a>closed</a>".
                 </li>
-                <li>Reject the promise
+                <li>If <var>request</var><a>[[\response]]</a> is not null,
+                then:
+                  <ol>
+                    <li>Let <var>response</var> be
+                    <var>request</var><a>[[\response]]</a>.

Missing dot. Also maybe you should do this before the "if request.[[response]] is not null" step (and then just check if response is null)

> @@ -4545,7 +4545,20 @@ <h2>
                 <li>Set <var>request</var>.<a>[[\state]]</a> to
                 "<a>closed</a>".
                 </li>
-                <li>Reject the promise
+                <li>If <var>request</var><a>[[\response]]</a> is not null,
+                then:
+                  <ol>
+                    <li>Let <var>response</var> be
+                    <var>request</var><a>[[\response]]</a>.
+                    </li>
+                    <li>Set <var>response</var><a>[[\complete]]</a> to true.

Missing dot

> @@ -4545,7 +4545,20 @@ <h2>
                 <li>Set <var>request</var>.<a>[[\state]]</a> to
                 "<a>closed</a>".
                 </li>
-                <li>Reject the promise
+                <li>If <var>request</var><a>[[\response]]</a> is not null,
+                then:
+                  <ol>
+                    <li>Let <var>response</var> be
+                    <var>request</var><a>[[\response]]</a>.
+                    </li>
+                    <li>Set <var>response</var><a>[[\complete]]</a> to true.
+                    </li>
+                    <li>Reject <var>response</var><a>[[\retryPromise]]</a> with

Missing dot

> @@ -4545,7 +4545,20 @@ <h2>
                 <li>Set <var>request</var>.<a>[[\state]]</a> to
                 "<a>closed</a>".
                 </li>
-                <li>Reject the promise
+                <li>If <var>request</var><a>[[\response]]</a> is not null,
+                then:
+                  <ol>
+                    <li>Let <var>response</var> be
+                    <var>request</var><a>[[\response]]</a>.
+                    </li>
+                    <li>Set <var>response</var><a>[[\complete]]</a> to true.
+                    </li>
+                    <li>Reject <var>response</var><a>[[\retryPromise]]</a> with

Is this guaranteed to always be non-null? If so maybe add an assert.

> @@ -4545,7 +4545,20 @@ <h2>
                 <li>Set <var>request</var>.<a>[[\state]]</a> to
                 "<a>closed</a>".
                 </li>
-                <li>Reject the promise
+                <li>If <var>request</var><a>[[\response]]</a> is not null,
+                then:
+                  <ol>
+                    <li>Let <var>response</var> be
+                    <var>request</var><a>[[\response]]</a>.
+                    </li>
+                    <li>Set <var>response</var><a>[[\complete]]</a> to true.
+                    </li>
+                    <li>Reject <var>response</var><a>[[\retryPromise]]</a> with
+                    <var>exception</var>.
+                    </li>
+                  </ol>
+                </li>
+                <li>Otherwise, reject
                 <var>request</var>.<a>[[\acceptPromise]]</a> with

The note at the bottom seems like it needs updating to mention the retryPromise/retry() in addition to the acceptPromise/show().

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/723#pullrequestreview-131785934

Received on Monday, 25 June 2018 21:16:37 UTC