Service Worker: Add an experimental API FetchEvent#addPerformanceEntry
This CL starts to implement FetchEvent WorkerTiming. This feature enables a service worker to attach PerformanceMark/PerformanceMeasure timings to a request during the fetch event handler. The timings will then be exposed to the page using PerformanceResourceTiming. This patch extends PerformanceMark/Measure by PerformanceEntry::toMojoPerformanceMarkOrMeasure() to pass them via Mojo pipe. A pair of Mojo endpoints for FetchEventWorkerTiming is made in ServiceWorkerSubresourceLoader::DispatchFetchEvent() and Mojo remote will be moved to FetchEvent. Mojo remote is null for navigation and subresources because it is unsupported yet. This feature won't work after this patch is merged because Mojo receiver and remote aren't be connected anywhere. These will be connected in the other patch. Explainer : https://github.com/wanderview/fetchevent-worker-timing/blob/master/explainer.md Design doc: https://docs.google.com/document/d/1-ebnv7OFiVd3k2-jbtQGO5s3BKHIp7lRx3ujhgNKvB0 Bug: 900700 Change-Id: Ie6c870faf0309990ccf8dbd986091fb2f1597dc5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903115 Commit-Queue: Yuta Kasai <yutakasai@google.com> Reviewed-by:Kent Tamura <tkent@chromium.org> Reviewed-by:
Tom Sepez <tsepez@chromium.org> Reviewed-by:
Nicolás Peña Moreno <npm@chromium.org> Reviewed-by:
Makoto Shimazu <shimazu@chromium.org> Reviewed-by:
Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#715171}
Showing
Please register or sign in to comment