S13nServiceWorker: Fix `fetchStart` performance timing for subresources
ServiceWorkerSubresourceLoader records loading milestones. These milestones are used to create web-exposed PerformanceResourceTiming. Before this CL, ServiceWorkerSubresourceLoader recorded |service_worker_ready_time| before calling GetControllerServiceWorker(). This doesn't seem a good timing to record it because: - |service_worker_ready_time| is used to create `fetchStart` of PerformanceResourceTiming. - `fetchStart` should be recorded after the controller service worker is ready to handle fetch event. - But the worker may not be running until we call GetControllerServiceWorker(). This CL moves the timing to record |service_worker_raedy_time| and some others after calling GetControllerServiceWorker(), as calling it makes sure that the controller is running and ready to handle a fetch event. The wpt ervice-workers/service-worker/resource-timing.https.html should cover this change. Bug: 782958 Change-Id: Ic6f6abd34ffdc84e002357a905e7a7726e6b5870 Reviewed-on: https://chromium-review.googlesource.com/1212244 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#589818}
Showing
Please register or sign in to comment