Less fragile |fetchController| termination check#1779
Closed
yoshisatoyanagisawa wants to merge 0 commit intow3c:mainfrom
Closed
Less fragile |fetchController| termination check#1779yoshisatoyanagisawa wants to merge 0 commit intow3c:mainfrom
yoshisatoyanagisawa wants to merge 0 commit intow3c:mainfrom
Conversation
Collaborator
Author
|
@domenic will you take a look? |
domenic
reviewed
Jun 13, 2025
| @@ -3265,6 +3265,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ | |||
| 1. Let |raceResponse| be a [=race response=] whose [=race response/value=] is "<code>pending</code>". | |||
| 1. Run the following substeps [=in parallel=], but [=abort when=] |fetchController|'s [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>": | |||
Contributor
There was a problem hiding this comment.
I think since there is only one substep, it's better to restructure this to remove "abort when" / "if aborted" entirely:
- Run the following steps in parallel:
- If fetchController's state is "terminated" or "aborted", then:
- Abort raceFetchController.
- Set raceResponse to a race response whose value is null.
- Set raceFetchController to the result of fetching given request, with processResponse set to the following steps given a response raceNetworkRequestResponse:
- If fetchController's state is "terminated" or "aborted", then ...
- ...
- If fetchController's state is "terminated" or "aborted", then:
This is equivalent to what is currently written, but clearer.
The same comment applies below.
Collaborator
Author
There was a problem hiding this comment.
I closed this by accident and not sure how to reopen. I opened the new one in #1780.
Since I think we need to abort the steps, I revised it to set [=abort when=] in the one level down step.
Please see the PR 1780.
9edf063 to
a402c93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up of #1777 (comment).
https://infra.spec.whatwg.org/#abort-when adds the check each time the step is executed. However, there is only a step between and the abort-when and if-aborted, it should be less effective abort than we expect. Let me add a step inside the callback in case.
Preview | Diff