Skip to content

Commit 526a0fe

Browse files
authored
Use [=AbortSignal/abort reason=] (#86)
* use [=AbortSignal/aborted=] * use [=AbortSignal/abort reason=] * one more abort reason use
1 parent 91f9f69 commit 526a0fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ The <dfn method for=LockManager>request(|name|, |callback|)</dfn> and
515515
1. If both |options|["`steal`"] and |options|["`ifAvailable`"] are true, then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}.
516516
1. If |options|["`steal`"] is true and |options|["`mode`"] is not "{{LockMode/exclusive}}", then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}.
517517
1. If |options|["`signal`"] [=map/exists=], and either of |options|["`steal`"] or |options|["`ifAvailable`"] is true, then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}.
518-
1. If |options|["`signal`"] [=map/exists=] and is [=AbortSignal/aborted=], then return [=a promise rejected with=] an "{{AbortError}}" {{DOMException}.
518+
1. If |options|["`signal`"] [=map/exists=] and is [=AbortSignal/aborted=], then return [=a promise rejected with=] |signal|'s [=AbortSignal/abort reason=].
519519
1. Let |promise| be [=a new promise=].
520520
1. [=Request a lock=] with |promise|, the current [=/agent=], |environment|'s [=environment/id=], |manager|, |callback|, |name|, |options|["`mode`"], |options|["`ifAvailable`"], |options|["`steal`"], and |options|["`signal`"].
521521
1. Return |promise|.
@@ -605,7 +605,7 @@ The <dfn attribute for=Lock>mode</dfn> getter's steps are to return the associat
605605
To <dfn>request a lock</dfn> with |promise|, |agent|, |clientId|, |manager|, |callback|, |name|, |mode|, |ifAvailable|, |steal|, and |signal|:
606606

607607
1. Let |request| be a new [=lock request=] (|agent|, |clientId|, |manager|, |name|, |mode|, |callback|, |promise|, |signal|).
608-
1. If |signal| is present, then [=AbortSignal/add=] the algorithm [=signal to abort the request=] |request| to |signal|.
608+
1. If |signal| is present, then [=AbortSignal/add=] the algorithm [=signal to abort the request=] |request| with |signal| to |signal|.
609609
1. [=parallel queue/Enqueue the following steps=] to the [=lock task queue=]:
610610
1. Let |queueMap| be |manager|'s [=lock manager/lock request queue map=].
611611
1. Let |queue| be the result of [=/getting the lock request queue=] from |queueMap| for |name|.
@@ -662,10 +662,10 @@ To <dfn>abort the request</dfn> |request|:
662662
</div>
663663

664664
<div algorithm>
665-
To <dfn>signal to abort the request</dfn> |request|:
665+
To <dfn>signal to abort the request</dfn> |request| with |signal|:
666666

667667
1. [=parallel queue/enqueue the following steps|Enqueue the steps=] to [=abort the request=] |request| to the [=lock task queue=].
668-
1. [=Reject=] |request|'s [=lock request/promise=] with an "{{AbortError}}" {{DOMException}}.
668+
1. [=Reject=] |request|'s [=lock request/promise=] with |signal|'s [=AbortSignal/abort reason=].
669669

670670
</div>
671671

0 commit comments

Comments
 (0)