You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Set |eventHandled| to [=a new promise=] in |workerRealm|.
3131
3131
1. [=Queue a task=] |task| to run the following substeps:
3132
3132
1. Let |e| be the result of <a>creating an event</a> with {{FetchEvent}}.
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|.
3133
+
1. Let |controller| be a [=new=]{{AbortController}} 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`", |controller|'s [=AbortController/signal=], and |workerRealm|.
3135
3135
1. Initialize |e|’s {{Event/type}} attribute to {{fetch!!event}}.
3136
3136
1. Initialize |e|’s {{Event/cancelable}} attribute to true.
3137
3137
1. Initialize |e|’s {{FetchEvent/request}} attribute to |requestObject|.
1. If |controller| [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>", then:
3157
3157
1. Let |deserializedError| be a "{{AbortError}}" {{DOMException}}.
3158
3158
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}}.
3159
-
1. [=Queue a task=] to [=AbortSignal/signal abort=] on |signal| with |deserializedError|.
3159
+
1. [=Queue a task=] to [=AbortController/signal abort=] on |controller| with |deserializedError|.
3160
3160
3161
3161
If |task| is discarded, set |handleFetchFailed| to true.
0 commit comments