mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
794756e970
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
35 lines
921 B
Plaintext
35 lines
921 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 PRemoteWorker;
|
|
|
|
include ServiceWorkerOpArgs;
|
|
include FetchTypes;
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
protocol PFetchEventOpProxy {
|
|
manager PRemoteWorker;
|
|
|
|
parent:
|
|
async AsyncLog(nsCString aScriptSpec, uint32_t aLineNumber,
|
|
uint32_t aColumnNumber, nsCString aMessageName,
|
|
nsString[] aParams);
|
|
|
|
async RespondWith(ChildToParentFetchEventRespondWithResult aResult);
|
|
|
|
async __delete__(ServiceWorkerFetchEventOpResult aResult);
|
|
|
|
child:
|
|
async PreloadResponse(ParentToChildInternalResponse aResponse);
|
|
|
|
async PreloadResponseTiming(ResponseTiming aTiming);
|
|
|
|
async PreloadResponseEnd(ResponseEndArgs aArgs);
|
|
};
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|