Skip to content

Fetch Timing Info's end time is set to a relative timestamp, when it should be the original captured unsafe current time #1812

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

Open
Lubrsi opened this issue Mar 5, 2025 · 2 comments
Assignees
Labels
topic: timing Issues and PR that touch on the infrastructure that is used by ResourceTiming, NavigationTiming, etc

Comments

@Lubrsi
Copy link

Lubrsi commented Mar 5, 2025

What is the issue with the Fetch Standard?

In fetch response handover, step 3.3.2 sets the timing info's end time to a relative timestamp of a previously captured unsafe shared current time. However, this is incorrect because Resource Timing performs the relative timestamp conversion for us.

In responseEnd:

The responseEnd getter steps are to convert fetch timestamp for this's timing info's end time and the relevant global object for this. See fetch for more info.

In setup the resource timing entry:

Initialize entry given the result of converting timingInfo's start time given global, "resource", requestedURL, and the result of converting timingInfo's end time given global.

@annevk
Copy link
Member

annevk commented Mar 6, 2025

I think the bug is Resource Timing doing duplicate/incorrect work. I helped design the Fetch aspects of this feature and did not want Fetch to leak any unsafe timing.

cc @noamr

@noamr noamr self-assigned this Mar 6, 2025
@noamr
Copy link
Contributor

noamr commented Mar 27, 2025

We should use the coarsened shared current time like we do in other places.
It's coarsened but not relative to the time origin.

@annevk annevk added the topic: timing Issues and PR that touch on the infrastructure that is used by ResourceTiming, NavigationTiming, etc label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: timing Issues and PR that touch on the infrastructure that is used by ResourceTiming, NavigationTiming, etc
Development

No branches or pull requests

3 participants