Skip to content

Commit e8e2b81

Browse files
authored
Editorial: pass signal to Request creation
See whatwg/fetch#1646 for context.
1 parent fb1e711 commit e8e2b81

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/index.bs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
31303130
1. Set |eventHandled| to [=a new promise=] in |workerRealm|.
31313131
1. [=Queue a task=] |task| to run the following substeps:
31323132
1. Let |e| be the result of <a>creating an event</a> with {{FetchEvent}}.
3133-
1. Let |requestObject| be the result of [=Request/creating=] a {{Request}} object, given |request|, a new {{Headers}} object's [=guard=] which is "`immutable`", and |workerRealm|.
3133+
1. Let |signal| be a [=new=] {{AbortSignal}} object with |workerRealm|.
3134+
1. Let |requestObject| be the result of [=Request/creating=] a {{Request}} object, given |request|, a new {{Headers}} object's [=guard=] which is "`immutable`", |signal|, and |workerRealm|.
31343135
1. Initialize |e|’s {{Event/type}} attribute to {{fetch!!event}}.
31353136
1. Initialize |e|’s {{Event/cancelable}} attribute to true.
31363137
1. Initialize |e|’s {{FetchEvent/request}} attribute to |requestObject|.
@@ -3155,7 +3156,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
31553156
1. If |controller| [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>", then:
31563157
1. Let |deserializedError| be a "{{AbortError}}" {{DOMException}}.
31573158
1. If |controller|'s [=fetch controller/serialized abort reason=] is non-null, set |deserializedError| to the result of calling [$StructuredDeserialize$] with |controller|'s [=fetch controller/serialized abort reason=] and |workerRealm|. If that threw an exception or returns undefined, then set |deserializedError| to a "{{AbortError}}" {{DOMException}}.
3158-
1. [=Queue a task=] to [=AbortSignal/signal abort=] on |requestObject|'s {{Request/signal}} with |deserializedError|.
3159+
1. [=Queue a task=] to [=AbortSignal/signal abort=] on |signal| with |deserializedError|.
31593160

31603161
If |task| is discarded, set |handleFetchFailed| to true.
31613162

0 commit comments

Comments
 (0)