Skip to content

Commit f564c21

Browse files
committed
Bug 1968644 - Part 6: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags during channel creation. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D252448
1 parent 8a8fd7b commit f564c21

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

netwerk/base/nsNetUtil.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "nsIBufferedStreams.h"
3939
#include "nsBufferedStreams.h"
4040
#include "nsIChannelEventSink.h"
41+
#include "nsIClassifiedChannel.h"
4142
#include "nsIContentSniffer.h"
4243
#include "mozilla/dom/Document.h"
4344
#include "nsIDownloader.h"
@@ -491,6 +492,15 @@ nsresult NS_NewChannelInternal(
491492
}
492493
}
493494

495+
if (aLoadingNode) {
496+
nsCOMPtr<nsILoadInfo> loadInfo = channel->LoadInfo();
497+
ClassificationFlags flags =
498+
aLoadingNode->OwnerDoc()->GetScriptTrackingFlags();
499+
500+
loadInfo->SetTriggeringFirstPartyClassificationFlags(flags.firstPartyFlags);
501+
loadInfo->SetTriggeringThirdPartyClassificationFlags(flags.thirdPartyFlags);
502+
}
503+
494504
channel.forget(outChannel);
495505
return NS_OK;
496506
}

0 commit comments

Comments
 (0)