- From: Scott Haseley <notifications@github.com>
- Date: Mon, 03 Apr 2023 15:21:11 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1152/review/1369839252@github.com>
@shaseley commented on this pull request.
> them. For instance, if the operation has already completed.
-<p>To <dfn export for=AbortSignal>signal abort</dfn>, given an {{AbortSignal}} object
-<var>signal</var> and an optional <var>reason</var>, run these steps:
+<p>To <dfn for=AbortSignal>signal abort</dfn>, given an {{AbortSignal}} object <var>signal</var> and
+an optional <var>reason</var>, run these steps:
Done.
>
- <li><p>If <var>parentSignal</var> is [=AbortSignal/aborted=], then
- <a for=AbortSignal>signal abort</a> on <var>followingSignal</var> with <var>parentSignal</var>'s
- [=AbortSignal/abort reason=].
+ <p class=XXX>As of the time of this writing Web IDL does not yet define any default behavior;
+ see <a href="https://github.com/whatwg/webidl/issues/135">whatwg/webidl#135</a>.
Good idea; done.
> @@ -1828,6 +1837,17 @@ JavaScript value. It is undefined unless specified otherwise.
<a for=/>set</a> of algorithms which are to be executed when it is [=AbortSignal/aborted=]. Unless
specified otherwise, its value is the empty set.
+<p>An {{AbortSignal}} object has a <dfn for="AbortSignal">composite</dfn> (a boolean), which is
+initially false.
+
+<p>An {{AbortSignal}} object has associated <dfn for=AbortSignal>source signals</dfn>, which is a
+<a for=/>set</a> of weak references to {{AbortSignal}} objects that the object is dependent on for
+its [=AbortSignal/aborted=] state. Unless specified otherwise, its value is the empty set.
+
+<p>An {{AbortSignal}} object has associated <dfn for=AbortSignal>dependent signals</dfn>, which is a
+<a for=/>set</a> of weak references to {{AbortSignal}} objects that are dependent on it for their
+[=AbortSignal/aborted=] state. Unless specified otherwise, its value is the empty set.
+
Agreed! Fixed.
> @@ -1828,6 +1837,17 @@ JavaScript value. It is undefined unless specified otherwise.
<a for=/>set</a> of algorithms which are to be executed when it is [=AbortSignal/aborted=]. Unless
specified otherwise, its value is the empty set.
+<p>An {{AbortSignal}} object has a <dfn for="AbortSignal">composite</dfn> (a boolean), which is
+initially false.
+
+<p>An {{AbortSignal}} object has associated <dfn for=AbortSignal>source signals</dfn>, which is a
+<a for=/>set</a> of weak references to {{AbortSignal}} objects that the object is dependent on for
+its [=AbortSignal/aborted=] state. Unless specified otherwise, its value is the empty set.
+
+<p>An {{AbortSignal}} object has associated <dfn for=AbortSignal>dependent signals</dfn>, which is a
+<a for=/>set</a> of weak references to {{AbortSignal}} objects that are dependent on it for their
+[=AbortSignal/aborted=] state. Unless specified otherwise, its value is the empty set.
Ah good catch, thanks, "weak set" semantics are indeed what I want (I still had Blink/Oilpan in mind where references/collection weakness happens automatically based on type).
Similarly, Mutation Observer's [node list](https://dom.spec.whatwg.org/#mutationobserver-node-list) should probably be a "weak list". It does add weak references to nodes, but the values [aren't null-checked on iteration](https://dom.spec.whatwg.org/#ref-for-mutationobserver-node-list%E2%91%A2) (I missed this in review, thinking a list of weak references would behave like a weak list).
Some clarification in Infra could be useful here, e.g. define weak sets & lists, weak references, their relationship, etc. I'll file an issue.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1152#discussion_r1156483601
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1152/review/1369839252@github.com>
Received on Monday, 3 April 2023 22:21:25 UTC