Skip to content

net: Rename FetchCanceller to FetchController - #48799

Merged
TimvdLippe merged 1 commit into
servo:mainfrom
TimvdLippe:introduce-fetch-controller
Oct 11, 2026
Merged

TimvdLippe merged 1 commit into
servo:mainfrom
TimvdLippe:introduce-fetch-controller

Conversation

@TimvdLippe

Copy link
Copy Markdown
Contributor

This is the first step to make various information available on the controller to be used for redirect computation. That's required to be able to fix the current navigation timing to set the redirectCount to zero when appropriate, see #48793

It also removes the unused canceller from Document and moves it to a separate file in net_traits.

Testing: it compiles

@TimvdLippe
TimvdLippe requested a review from gterzian as a code owner October 10, 2026 17:57
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 10, 2026
Comment thread components/shared/net/Cargo.toml Resolved
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 10, 2026
This is the first step to make various information available on the
controller to be used for redirect computation. That's required to be
able to fix the current navigation timing to set the redirectCount to
zero when appropriate, see servo#48793

It also removes the unused canceller from `Document` and moves it to a
separate file in `net_traits`.

Testing: it compiles

Signed-off-by: Tim van der Lippe <[email protected]>
@TimvdLippe
TimvdLippe force-pushed the introduce-fetch-controller branch from ef740b2 to f85d2e0 Compare October 11, 2026 07:39
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 11, 2026
@TimvdLippe
TimvdLippe enabled auto-merge October 11, 2026 07:39
@TimvdLippe
TimvdLippe added this pull request to the merge queue Oct 11, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 11, 2026
Merged via the queue into servo:main with commit 803fd92 Oct 11, 2026
38 checks passed
@TimvdLippe
TimvdLippe deleted the introduce-fetch-controller branch October 11, 2026 08:30
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 11, 2026
@TimvdLippe

Copy link
Copy Markdown
Contributor Author

@mrobinson I saw your comment on the commit and for some reason, GitHub doesn't show it, thus I cannot respond there.

Is this truly unused as it seems that the original intention was that dropping the document should automatically cancel the fetch?

That's a good point that I didn't think of. Once again I am bitten by the trickiness of Drop and the assumptions it creates. I don't know what the implications are and whether we actually still drop it in some way else. My current thinking is that since the canceller is part of incomplete and the navigation would be cancelled, it would be dropped there? But that's all assumptions and I don't really know how we could verify that claim.

@mrobinson

Copy link
Copy Markdown
Member

@mrobinson I saw your comment on the commit and for some reason, GitHub doesn't show it, thus I cannot respond there.

Sorry, yeah. The GitHub interface for this is really quite bad.

Is this truly unused as it seems that the original intention was that dropping the document should automatically cancel the fetch?

That's a good point that I didn't think of. Once again I am bitten by the trickiness of Drop and the assumptions it creates. I don't know what the implications are and whether we actually still drop it in some way else. My current thinking is that since the canceller is part of incomplete and the navigation would be cancelled, it would be dropped there? But that's all assumptions and I don't really know how we could verify that claim.

I later updated my comment to say that I didn't see any Drop implementation for FetchCanceller so perhaps if this was the original intention of the code, it is no longer relevant.

@TimvdLippe

Copy link
Copy Markdown
Contributor Author

Ah yes we did that in #41384 so I guess this would have been an issue for about a year 🤔

hhhwsqhhh pushed a commit to hhhwsqhhh/servo that referenced this pull request Oct 12, 2026
This is the first step to make various information available on the
controller to be used for redirect computation. That's required to be
able to fix the current navigation timing to set the redirectCount to
zero when appropriate, see servo#48793

It also removes the unused canceller from `Document` and moves it to a
separate file in `net_traits`.

Testing: it compiles

Signed-off-by: Tim van der Lippe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants