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

@mingyc commented on this pull request.



> +  </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
+ <var>quota</var>.
+
+ <li><p>Return <var>quotaForRequestOrigin</var>.
+</ol>
+</div>
+
+<div algorithm>
+<p>To <dfn export>reserve deferred-fetch quota</dfn> for a <a>navigable container</a>
+<var>container</var> given an <a for=/>origin</a> <var>originToNavigateTo</var>:
+
+<p class=note>This is called when <var>container</var> and the document that initiated the

> the owner element has to notify the remote frame of the new quota. The quota is saved on the container, but the frame has to have read-only access to it.

I do perform the update, but I think the problem is that the remote frame is some how created after that update. The ordering looks like this

- `Document creation`
- Run `potentially free deferred-fetch quota`
- `Navigation begin` to `b.com`
- Run `reserve deferred-fetch quota`
- Owner element notifies the update of deferred-fetch quota => No one receives it
- Remote owner element gets created, using the outdated deferred-fetch quota
- Remote content element gets created
- DidCommitNavigation

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

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

Received on Wednesday, 15 January 2025 05:11:37 UTC