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. If |navigationPreloadResponse|'s [=response/type=] is "`error`", reject |preloadResponse| with a `TypeError` and terminate these substeps.
3058
3058
1. Associate |preloadResponseObject| with |navigationPreloadResponse|.
3059
3059
1. Resolve |preloadResponse| with |preloadResponseObject|.
3060
-
1. [=If aborted=], then [=fetch controller/abort=] |preloadFetchController|.
3060
+
1. [=If aborted=], then:
3061
+
1. Let |deserializedError| be a "{{AbortError}}" {{DOMException}}.
3062
+
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}}.
3063
+
1. [=Fetch controller/abort=] |preloadFetchController| with |deserializedError|.
3061
3064
1. Else, resolve |preloadResponse| with undefined.
3062
3065
3063
3066
Note: From this point, the [=/service worker client=] starts to <a>use</a> its <a>active service worker</a>'s <a>containing service worker registration</a>.
1. Set |eventHandled| to [=a new promise=] in |workerRealm|.
3082
3085
1. [=Queue a task=] |task| to run the following substeps:
3083
3086
1. Let |e| be the result of <a>creating an event</a> with {{FetchEvent}}.
3084
-
1. Let |requestObject| be a new {{Request}} object associated with |request| and a new associated {{Headers}} object whose [=guard=] is "`immutable`".
3087
+
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|.
3085
3088
1. Initialize |e|’s {{Event/type}} attribute to {{fetch!!event}}.
3086
3089
1. Initialize |e|’s {{Event/cancelable}} attribute to true.
3087
3090
1. Initialize |e|’s {{FetchEvent/request}} attribute to |requestObject|.
1. Else, [=ReadableStream/cancel=] |request|'s [=request/body=] with undefined.
3104
3107
1. If |response| is not null, then set |response|'s [=response/service worker timing info=] to |timingInfo|.
3105
3108
1. If |e|'s <a>canceled flag</a> is set, set |eventCanceled| to true.
3106
-
1. If |controller| [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>", then [=queue a task=] to [=AbortSignal/signal abort=] on |requestObject|'s {{Request/signal}}.
3109
+
1. If |controller| [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>", then:
3110
+
1. Let |deserializedError| be a "{{AbortError}}" {{DOMException}}.
3111
+
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}}.
3112
+
1. [=Queue a task=] to [=AbortSignal/signal abort=] on |requestObject|'s {{Request/signal}} with |deserializedError|.
3107
3113
3108
3114
If |task| is discarded, set |handleFetchFailed| to true.
0 commit comments