Commit 80ebad5
authored
Reserve/free quota for fetchLater()
The logic for deferred fetching (the `fetchLater` function), as
defined in the fetch spec, specifies a "quota" which is shared
with between a document and its direct same-origin descendants.
For this logic to work in a secure way, the quota needs to be:
- reserved when a frame-initiated navigation starts. This way,
the container document can only reserve quota based on URLs
it knows it navigates to.
- freed if the document ends up being same origin with its
container, upon document creation.
This ensures quota is handled correctly in the case of
redirects.
This PR adds those two calls:
- Call "reserve" on navigation, based on `sourceDocument`.
- Call "potentially free" on document creation.
Builds on whatwg/fetch#1647, where
the quota logic itself is defined.1 parent 8119cac commit 80ebad5
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2624 | 2624 | | |
2625 | 2625 | | |
2626 | 2626 | | |
| 2627 | + | |
| 2628 | + | |
2627 | 2629 | | |
2628 | 2630 | | |
2629 | 2631 | | |
| |||
102327 | 102329 | | |
102328 | 102330 | | |
102329 | 102331 | | |
| 102332 | + | |
| 102333 | + | |
| 102334 | + | |
| 102335 | + | |
| 102336 | + | |
102330 | 102337 | | |
102331 | 102338 | | |
102332 | 102339 | | |
| |||
107235 | 107242 | | |
107236 | 107243 | | |
107237 | 107244 | | |
| 107245 | + | |
| 107246 | + | |
107238 | 107247 | | |
107239 | 107248 | | |
107240 | 107249 | | |
| |||
0 commit comments