gecko-dev/dom/serviceworkers/PFetchEventOp.ipdl
Eden Chuang 794756e970 Bug 1810816 - P4 Report the preload response timing for ServiceWorker NavigationPreload. r=dom-worker-reviewers,asuth
Response Timing should be reported before the body stream completing.

In the original implementation, the response timing is recorded when OnResponseEnd is called, but it is too late. Response timing could not be ready when response.text() or response.blob() resolves the promise.

This is the fourth patch for reporting the preload response timing for ServiceWorker NavigationPreload.
This patch adds the needed IPCs PFetchEventOp and PFetchEventOpProxy to propagate the preload response timing from the parent process main thread to the content process worker thread.
Since navigation preload is an asynchronous action, corresponding promises for asynchronous propagation are also created in FetchService, FetchEventOpChild, FetchEventOpProxyChild, and FetchEventOp.

Depends on D167938

Differential Revision: https://phabricator.services.mozilla.com/D167939
2023-02-23 02:52:54 +00:00

36 lines
954 B
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PRemoteWorkerController;
include ServiceWorkerOpArgs;
include FetchTypes;
namespace mozilla {
namespace dom {
[ManualDealloc]
protocol PFetchEventOp {
manager PRemoteWorkerController;
parent:
async PreloadResponse(ParentToParentInternalResponse aResponse);
async PreloadResponseTiming(ResponseTiming aTiming);
async PreloadResponseEnd(ResponseEndArgs aArgs);
child:
async AsyncLog(nsCString aScriptSpec, uint32_t aLineNumber,
uint32_t aColumnNumber, nsCString aMessageName,
nsString[] aParams);
async RespondWith(ParentToParentFetchEventRespondWithResult aResult);
async __delete__(ServiceWorkerFetchEventOpResult aResult);
};
} // namespace dom
} // namespace mozilla