S13nServiceWorker: Fix `requestStart` performance timing for navigation
ServiceWorkerNavigationLoader is responsible for setting up LoadTimingInfo which are used to create web-exposed PerformanceResourceTiming. Specifically, the field |send_start| in LoadTimingInfo is populated as `requestStart` in PerformanceResourceTiming. The resource timing spec[1] doesn't state explicitly but according to a spec discussion[2], following ordering would be reasonable: workerStart <= fetchStart <= requestStart Before this CL, ServiceWorkerNavigationLoader recorded `requestStart` before starting a service worker, at the same time `workerStart` is recorded. This doesn't seem a good timing because `requestStart` would be less than `fetchStart`, which is recorded after the service worker is started. This CL moves the timing to record |send_start| (and corresponding |send_end|) to the time the service worker is started. Note that web-exposed `fetchStart` still doesn't follow the above ordering even after this CL, as we have a special case code for `fetchStart` in navigation. A follow-up CL will address `fetchStart` case. The wpt service-workers/service-worker/navigation-timing.https.html should cover this change. [1] https://w3c.github.io/resource-timing/#sec-performanceresourcetiming [2] https://github.com/w3c/resource-timing/issues/119 Bug: 782958 Change-Id: I339d41d8c93a2cbcd053d4348d8e0f51b1134925 Reviewed-on: https://chromium-review.googlesource.com/1212423Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Makoto Shimazu <shimazu@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#589458}
Showing
Please register or sign in to comment