Closed Bug 1864392 Opened 1 year ago Closed 5 months ago

Honor `fetchpriority` attribute for HTTP/3 requests

Categories

(Core :: Networking: HTTP, task, P2)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: mbrodesser-Igalia, Assigned: valentin)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged][necko-priority-next])

Attachments

(1 file)

HTTP/3 requests use the mapping of the class of service at https://searchfox.org/mozilla-central/rev/40d51bef58b8e901d6ab4b60dd280f372a0e417d/netwerk/protocol/http/Http3Stream.cpp#83-106 to determine their priority.

See https://searchfox.org/mozilla-central/rev/fe8b30e982c86d26ccf1f14d825c0de870b91f27/modules/libpref/init/StaticPrefList.yaml#12397-12399 for a link to the extensible prioritization scheme for HTTP used by HTTP/3 in Gecko.

However, the fetchpriority attribute currently only affects nsISupportsPriority, see e.g. https://searchfox.org/mozilla-central/rev/fe8b30e982c86d26ccf1f14d825c0de870b91f27/dom/script/ScriptLoader.cpp#692,698, not the class of service mentioned above.

Hence, fetch priority currently doesn't affect HTTP/3 requests.

We currently send a priority update only when the window of the request becomes active/inactive:
https://searchfox.org/mozilla-central/rev/fe8b30e982c86d26ccf1f14d825c0de870b91f27/netwerk/protocol/http/Http3Stream.cpp#158

We should make sure to consider the fetchpriority when sending the update, and also when issuing the initial request here
https://searchfox.org/mozilla-central/rev/fe8b30e982c86d26ccf1f14d825c0de870b91f27/netwerk/protocol/http/Http3Session.cpp#1157

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-review]

Presumably the initial version of fetchpriority can ship without this.

Duplicate of this bug: 1882782
Assignee: nobody → valentin.gosu
See Also: → 1865040
Whiteboard: [necko-triaged][necko-priority-review] → [necko-triaged][necko-priority-next]

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:valentin, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(rjesup)

Will land this week.

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(rjesup)
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/779d7dc63e81 Adjust HTTP urgency based on fetchpriority/nsISupportsPriority value r=necko-reviewers,jesup
Backout by acseh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b9c89f96c25 Backed out changeset 779d7dc63e81 for causing mochitest failures on browser_net_copy_headers.js

Backed out for causing mochitest failures on browser_net_copy_headers.js

Blocks: 1892734
Component: Networking → Networking: HTTP

(In reply to Aron Cseh from comment #9)

Backed out for causing mochitest failures on browser_net_copy_headers.js

The test expects u=1 at https://searchfox.org/mozilla-central/rev/ccb101be8f27d837b655ccee51a52c0337dd1eb8/devtools/client/netmonitor/test/browser_net_copy_headers.js#50 but with the patch it gets u=0.

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e19c8f1d3cf7 Adjust HTTP urgency based on fetchpriority/nsISupportsPriority value r=necko-reviewers,jesup,devtools-reviewers
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
See Also: → 1865394
Blocks: 1865370
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: