From 79e358e4f3408888b489b9bfc4de73b04aef4cdd Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 10 Nov 2021 16:43:34 +0100 Subject: [PATCH 1/3] use [=AbortSignal/aborted=] --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 0bbe6b7..0beb8b5 100644 --- a/index.bs +++ b/index.bs @@ -503,7 +503,7 @@ The request(|name|, |callback|) and 1. If both |options|' `steal` dictionary member and |options|' `ifAvailable` dictionary member are true, then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. 1. If |options|' `steal` dictionary member is true and |options|' `mode` dictionary member is not "{{exclusive}}", then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. 1. If |options|' `signal` dictionary member is present, and either of |options|' `steal` dictionary member or |options|' `ifAvailable` dictionary member is true, then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. -1. If |options|' `signal` dictionary member is present and its [=AbortSignal/aborted flag=] is set, then return [=a promise rejected with=] an "{{AbortError}}" {{DOMException}. +1. If |options|' `signal` dictionary member is present and is [=AbortSignal/aborted=], then return [=a promise rejected with=] an "{{AbortError}}" {{DOMException}. 1. Let |promise| be [=a new promise=]. 1. [=Request a lock=] with |promise|, the current [=/agent=], |environment|'s [=environment/id=], |origin|, |callback|, |name|, |options|' `mode` dictionary member, |options|' `ifAvailable` dictionary member, |options|' `steal` dictionary member, and |options|' `signal` dictionary member. 1. Return |promise|. @@ -684,7 +684,7 @@ To process the lock request queue |queue|: 1. [=set/Append=] |lock| to |origin|'s [=held lock set=]. 1. [=Enqueue the following steps=] on |callback|'s [=relevant settings object=]'s [=responsible event loop=]: 1. If |signal| is present, then run these steps: - 1. If |signal|'s [=AbortSignal/aborted flag=] is set, then run these steps: + 1. If |signal| is [=AbortSignal/aborted=], then run these steps: 1. [=Enqueue the following step=] to the [=lock task queue=]: 1. [=Release the lock=] |lock|. 1. Return. From 6671bee38e17c34d4c786519ef46ff93b6dce1f6 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 10 Nov 2021 16:54:35 +0100 Subject: [PATCH 2/3] use [=AbortSignal/abort reason=] --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 0beb8b5..4f9381e 100644 --- a/index.bs +++ b/index.bs @@ -594,7 +594,7 @@ The mode getter's steps are to return the associat To request a lock with |promise|, |agent|, |clientId|, |origin|, |callback|, |name|, |mode|, |ifAvailable|, |steal|, and |signal|: 1. Let |request| be a new [=lock request=] (|agent|, |clientId|, |origin|, |name|, |mode|, |callback|, |promise|, |signal|). -1. If |signal| is present, then [=AbortSignal/add=] the algorithm [=signal to abort the request=] |request| to |signal|. +1. If |signal| is present, then [=AbortSignal/add=] the algorithm [=signal to abort the request=] |request| with |signal| to |signal|. 1. [=Enqueue the following steps=] to the [=lock task queue=]: 1. Let |queueMap| be |origin|'s [=lock request queue map=]. 1. Let |queue| be the result of [=/getting the lock request queue=] from |queueMap| for |name|. @@ -651,10 +651,10 @@ To abort the request |request|:
-To signal to abort the request |request|: +To signal to abort the request |request| with |signal|: 1. [=enqueue the following steps|Enqueue the steps=] to [=abort the request=] |request| to the [=lock task queue=]. -1. [=Reject=] |request|'s [=lock request/promise=] with an "{{AbortError}}" {{DOMException}}. +1. [=Reject=] |request|'s [=lock request/promise=] with |signal|'s [=AbortSignal/abort reason=].
From 829dceaf11a31aca9887ee8e283441a095d2d0cc Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 10 Nov 2021 18:01:46 +0100 Subject: [PATCH 3/3] one more abort reason use --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 4f9381e..5cacbe6 100644 --- a/index.bs +++ b/index.bs @@ -503,7 +503,7 @@ The request(|name|, |callback|) and 1. If both |options|' `steal` dictionary member and |options|' `ifAvailable` dictionary member are true, then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. 1. If |options|' `steal` dictionary member is true and |options|' `mode` dictionary member is not "{{exclusive}}", then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. 1. If |options|' `signal` dictionary member is present, and either of |options|' `steal` dictionary member or |options|' `ifAvailable` dictionary member is true, then return [=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. -1. If |options|' `signal` dictionary member is present and is [=AbortSignal/aborted=], then return [=a promise rejected with=] an "{{AbortError}}" {{DOMException}. +1. If |options|' `signal` dictionary member is present and is [=AbortSignal/aborted=], then return [=a promise rejected with=] |signal|'s [=AbortSignal/abort reason=]. 1. Let |promise| be [=a new promise=]. 1. [=Request a lock=] with |promise|, the current [=/agent=], |environment|'s [=environment/id=], |origin|, |callback|, |name|, |options|' `mode` dictionary member, |options|' `ifAvailable` dictionary member, |options|' `steal` dictionary member, and |options|' `signal` dictionary member. 1. Return |promise|.