[whatwg/fetch] `Request`: this's signal is null when it is set to follow parent signal (#1249)

Might just be misunderstanding something, but I think there is a spec inconsistency. Here is my thinking:

1. this's signal of `Request` is set to `null` initially
2. step 28. of the `Request` constructor algorithm reads: "If signal is not null, then make this’s signal follow signal."
3. as per [follow a signal](https://dom.spec.whatwg.org/#abortsignal-follow), following doesn't create a signal, it only sets a child signal to follow a parent signal
4. at the time when step 28 of `Request` constructor is run, this's signal is still null.

Shouldn't either the signal get initialized to an AbortSignal, or have step 28 create a new signal before setting it to follow the parent?

Additionally as per the current spec wording, step 41 of `Request` constructor would reset any existing signals to a new `AbortSignal`. Maybe this should just be moved up before step 28?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1249

Received on Saturday, 5 June 2021 22:30:37 UTC