Re: [whatwg/fetch] Deferred fetching (PR #1647)

@mingyc commented on this pull request.



> +  <a for="fetch group">deferred fetch records</a>:</p>
+
+  <ol>
+   <li><p>Let <var>requestLength</var> be the <a>total request length</a> of
+   <var>deferredRecord</var>'s <a for="deferred fetch record">request</a>.
+
+   <li><p>Decrement <var>quota</var> by <var>requestLength</var>.
+
+   <li><p>If <var>deferredRecord</var>'s <a for="deferred fetch record">request</a>'s
+   <a for=request>URL</a>'s <a for=url>origin</a> is <a>same origin</a> with <var>origin</var>,
+   then decrement <var>quotaForRequestOrigin</var> by <var>requestLength</var>.
+  </ol>
+
+ <li><p>If <var>quota</var> is equal or less than 0, then return 0.
+
+ <li><p>If <var>quota</var> is less than <var>quotaForRequestOrigin</var>, then return

```
If quota is less than quotaForOrigin, then return quota.
```

(Discussed offline in chat, but copying here)

Given the following examples:

```
// root (a.com) -> frame-1 (a.com) -> frame-2 (b.com)
//              -> frame-3 (b.com) -> frame-4 (a.com)
```

I'd like to verify quotas for the above 5 documents:

```
root: 64kb? (the result I got, but isn't 8kb taken by frame-2?)
frame-1: 54kb
frame-2: 8kb
frame-3: 8kb
frame-4: 0kb?
```

The questionable part is `root` and `frame-1`, they can't get more than 64kb quota due to the quoted return step at the beginning.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647#pullrequestreview-2516818239
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1647/review/2516818239@github.com>

Received on Friday, 20 December 2024 05:42:40 UTC