Skip to content

Fix: Ensure timingInfo is returned on network fallback if SW static routing API is used #1774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3310,8 +3310,12 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
1. [=fetch controller/Abort=] |preloadFetchController| with |deserializedError|.
1. Else, resolve |preloadResponse| with undefined.
1. Let |fetchResult| be the result of [=Create Fetch Event and Dispatch=] with |request|, |registration|, |useHighResPerformanceTimers|, |timingInfo|, |workerRealm|, |reservedClient|, |preloadResponse|, and null.
1. If |fetchResult| is not null and |fetchResult|'s [=response/service worker timing info=]'s [=service worker timing info/worker final router source=] is set to {{RouterSourceEnum/"network"}}:
1. Set |fetchResult|'s [=response/service worker timing info=]'s [=service worker timing info/worker final router source=] to {{RouterSourceEnum/"fetch-event"}}.
1. If |timingInfo|'s [=service worker timing info/worker final router source=] is not an empty string:
1. Assert |timingInfo|'s [=service worker timing info/worker final router source=] is {{RouterSourceEnum/"network"}}.
1. If |fetchResult| is null, then return |timingInfo|.
1. Else:
1. Assert |fetchResult|'s [=response/service worker timing info=]'s [=service worker timing info/worker final router source=] is {{RouterSourceEnum/"network"}}.
1. Set |fetchResult|'s [=response/service worker timing info=]'s [=service worker timing info/worker final router source=] to {{RouterSourceEnum/"fetch-event"}}.
1. Return |fetchResult|.
</section>

Expand Down