Skip to content

Commit

Permalink
Update the request's boolean field name
Browse files Browse the repository at this point in the history
  • Loading branch information
xyaoinum committed Apr 4, 2024
1 parent 931713d commit 9507e05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
5. Let <var ignore=''>insideSettings</var> be the result of [=setting up a worklet environment settings object=] given <var ignore=''>realmExecutionContext</var>, <var ignore=''>outsideSettings</var>, and |worklet|.

### Monkey Patch for [=/request=] ### {#request-monkey-patch}
A [=/request=] has an associated <dfn for=request>is cross origin shared storage worklet request boolean</dfn>. Unless stated otherwise it is false.
A [=/request=] has an associated <dfn for=request>is shared storage cross origin worklet request boolean</dfn>. Unless stated otherwise it is false.

### Monkey Patch for [=fetch a worklet script graph=] ### {#fetch-a-worklet-script-graph-monkey-patch}

Expand All @@ -480,12 +480,12 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
Note: For shared storage, redirects are disallowed for the module script request. With this restriction, it's possible to define and to use the algorithm that gets the |realm|'s <span class=todo>HostDefined</span> field's [=environment settings object/origin=] (as described in [[#set-up-a-worklet-environment-settings-object-monkey-patch]]) as soon as the {{SharedStorageWorkletGlobalScope}} is created, as the origin won't change. This restriction may be removed in a future iteration of the design. If redirects become allowed, presumably, the algorithm that gets the |realm|'s <span class=todo>HostDefined</span> field's [=environment settings object/origin=] should be updated to return the final request's [=request/URL=]'s [=url/origin=] after receiving the final request's response, and the user preference checkings shall only be done after that point.

1. If <var ignore=''>moduleResponsesMap</var>'s [=associated realm=]'s <span class=todo>HostDefined</span> field's [=environment settings object/origin=] and |fetchClient|'s [=environment settings object/origin=] are not [=same origin=]:
1. Set |request|'s [=request/is cross origin shared storage worklet request boolean=] to true.
1. Set |request|'s [=request/is shared storage cross origin worklet request boolean=] to true.

### Monkey Patch for [=HTTP fetch=] ### {#http-fetch-monkey-patch}
The following step will be added to the [=HTTP fetch=] steps, before checking the redirect status (i.e. "If |actualResponse|'s status is a redirect status, ..."):

1. If |request|'s [=request/is cross origin shared storage worklet request boolean=] is true:
1. If |request|'s [=request/is shared storage cross origin worklet request boolean=] is true:
1. Let |list| be |actualResponse|'s [=response/header list=].
1. Let |sharedStorageWorkletAllowed| be the result of running [=get a structured field value=] algorithm given "Shared-Storage-Cross-Origin-Worklet-Allowed", "item", and |list| as input.
1. If |sharedStorageWorkletAllowed| is false, then return a [=network error=].
Expand Down

0 comments on commit 9507e05

Please sign in to comment.