deferred
")
"deferred
", "scheduled
", "terminated
",
- "aborted
", or "sent
".
+ "aborted
", or "activated
".
-
This value can be modified in parallel. To set it safely, use atomic - operations, e.g. atomically exchange the value (set it to the new value and return the new value - in one operation). +
This value can be modified in parallel. There could be a race condition where
+ the For each fetch record record in fetchGroup's
- fetch records, if record's controller
- is non-null and record's request's done flag is unset
- and keepalive is false, terminate
- record's controller.
-
- For each deferred fetch record
- deferredRecord in fetchGroup's
- deferred fetch records: If the result of atomically exchanging the value
- of deferredRecord's invoke state with
- " For each fetch record record of
+ fetchGroup's fetch records, if record's
+ controller is non-null and record's
+ request's done flag is unset and keepalive is
+ false, terminate record's
+ controller.
+
+ For each deferred fetch record
+ deferredRecord of fetchGroup's
+ deferred fetch records:
+
+ Set deferredRecord's invoke state to
+ " When a fetch group fetchGroup is
deactivated:
-For each deferred fetch record deferredRecord in
+For each deferred fetch record deferredRecord of
fetchGroup's deferred fetch records whose
-inactivity deferred delay is not null:
+inactivity delay is not null:
Set deferredRecord's invoke state to
@@ -2761,28 +2766,20 @@ not fully active. It has the following items
The user agent should wait until deferredRecord's
- inactivity deferred delay have passed or until
+ inactivity delay have passed or until
deferredRecord's invoke state is not
" If the result of atomically exchanging the value of deferredRecord's
- invoke state with " If deferredRecord's is not " Set deferredRecord's invoke state to
+ " When a fetch group fetchGroup is
-reactivated:
-For each deferred fetch record deferredRecord in
-fetchGroup's deferred fetch records: If the result of atomically
-exchanging the value of deferredRecord's invoke state
-with "Document
object's event loop might change it to
+ "deferred
" at the same time that it is changed to "activated
". UAs can
+ mitigate this race condition in an implementation-defined manner.
@@ -2731,26 +2729,33 @@ not fully active. It has the following items
terminated:
-
terminated
" is not "sent
", then the user agent should
- fetch deferredRecord's request. The
- exact time in which the fetch takes place is implementation-defined.
+
+
+ terminated
".
+
+
-
- scheduled
". The user agent may wait for a longer or shorter period time, e.g., to
optimize batching of deferred fetches.
- sent
" is
- "scheduled
", then fetch record's
- request.
+ scheduled
", abort these steps.
+
+ activated
".
+
+ deferred
" is "sent
", then remove
-deferredRecord from fetchGroup's
-deferred fetch records and set deferredRecord's
-sent to true.
Resolving domains
@@ -6755,8 +6752,8 @@ is deactivated.
Let deferredRecord be a new deferred fetch record whose request is request. -
Set deferredRecord's inactivity deferred delay - to inactivityDeferredDelay. +
Set deferredRecord's inactivity delay to + inactivityDeferredDelay.
Append deferredRecord to request's client's fetch group's @@ -8630,7 +8627,7 @@ dictionary DeferredRequestInit : RequestInit { }; interface FetchLaterResult { - readonly attribute boolean sent; + readonly attribute boolean activated; }; partial interface mixin WindowOrWorkerGlobalScope { @@ -8642,8 +8639,9 @@ partial interface mixin WindowOrWorkerGlobalScope { deferred record.
The sent
getter steps are to return
-this's deferred record's sent.
+
The activated
getter steps are to return
+true if this's deferred record's
+invoke state is "activated
"; Otherwise false.