Bug 1935088 - set thirdparty contexts for fetch keepalive requests. r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D231754
This commit is contained in:
smayya
2024-12-20 11:36:24 +00:00
parent d341105079
commit 0aab8b73b0
6 changed files with 36 additions and 13 deletions

View File

@@ -276,10 +276,15 @@ RefPtr<FetchServicePromises> FetchService::FetchInstance::Fetch() {
}
mFetchDriver->SetAssociatedBrowsingContextID(
args.mAssociatedBrowsingContextID);
mFetchDriver->SetIsThirdPartyWorker(Some(args.mIsThirdPartyContext));
mFetchDriver->SetIsThirdPartyContext(Some(args.mIsThirdPartyContext));
mFetchDriver->SetIsOn3PCBExceptionList(args.mIsOn3PCBExceptionList);
}
if (mArgsType == FetchArgsType::MainThreadFetch) {
auto& args = mArgs.as<MainThreadFetchArgs>();
mFetchDriver->SetIsThirdPartyContext(Some(args.mIsThirdPartyContext));
}
mFetchDriver->EnableNetworkInterceptControl();
mPromises = MakeRefPtr<FetchServicePromises>();