Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implement PerformanceResourceTiming.workerStart in ServiceWorkers
https://bugs.webkit.org/show_bug.cgi?id=179377 rdar://problem/35391187 Patch by Youenn Fablet <youennf@gmail.com> on 2022-06-14 Reviewed by Alex Christensen. Store the time when we are about to either fire the fetch event or run the service worker to fire the fetch event. To do so, we store it in NetworkResourceLoader and send the value to WebResourceLoader. In case of process swap, we send it back to the new WebResourceLoader. WebResourceLoader is then responsible to update the network load metrics when receiving the response/finish load metrics. Covered by updated tests. * LayoutTests/http/wpt/service-workers/navigation-timing.https-expected.txt: * LayoutTests/http/wpt/service-workers/navigation-timing.js: (event.setTimeout): * LayoutTests/http/wpt/service-workers/resources/navigation-timing-part-2.html: * Source/WebCore/page/PerformanceResourceTiming.cpp: (WebCore::PerformanceResourceTiming::workerStart const): * Source/WebCore/platform/network/NetworkLoadMetrics.cpp: (WebCore::NetworkLoadMetrics::updateFromFinalMetrics): (WebCore::NetworkLoadMetrics::isolatedCopy const): * Source/WebCore/platform/network/NetworkLoadMetrics.h: (WebCore::NetworkLoadMetrics::encode const): (WebCore::NetworkLoadMetrics::decode): * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::transferToNewWebProcess): (WebKit::NetworkResourceLoader::continueWillSendRequest): (WebKit::NetworkResourceLoader::setWorkerStart): * Source/WebKit/NetworkProcess/NetworkResourceLoader.h: * Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp: (WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask): * Source/WebKit/WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponse): (WebKit::WebResourceLoader::didFinishResourceLoad): * Source/WebKit/WebProcess/Network/WebResourceLoader.h: (WebKit::WebResourceLoader::setWorkerStart): * Source/WebKit/WebProcess/Network/WebResourceLoader.messages.in: Canonical link: https://commits.webkit.org/251523@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
0e76c10
commit 729991ba18101356da55e5f09dcce7140c473613
Showing
12 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
| @@ -1 +1 @@ | ||
| PASS - navigation timing as expected | ||
| PASS |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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