Bug 1819570 - P1 Propagate worker's assocaited BrowsingContextID through PFetch to the parent process. r=asuth

After PFetch is enabled, fetch() call in workers will not create a channel in the content process anymore.
Although netmonitor also watches the channels in the parent process, the created channel still loses the BrowsingContext information for netmonitor to connect the network event and the channel.

This patch is the first part to propagte the worker's associated BrowsingContextID to the parent process through PFetch.

Differential Revision: https://phabricator.services.mozilla.com/D174249
This commit is contained in:
Eden Chuang
2023-05-04 02:46:31 +00:00
parent 8a473c1bd9
commit 36e87d7240
11 changed files with 27 additions and 2 deletions

View File

@@ -227,6 +227,8 @@ RefPtr<FetchServicePromises> FetchService::FetchInstance::Fetch() {
if (args.mCSPEventListener) {
mFetchDriver->SetCSPEventListener(args.mCSPEventListener);
}
mFetchDriver->SetAssociatedBrowsingContextID(
args.mAssociatedBrowsingContextID);
}
mFetchDriver->EnableNetworkInterceptControl();