Bug 1639901 - Set PerformanceResourceTiming.initiatorType to "link" on channel initiated by <link rel=preload> tags, r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D76485
This commit is contained in:
@@ -1477,7 +1477,11 @@ nsresult ScriptLoader::StartLoad(ScriptLoadRequest* aRequest) {
|
||||
// Set the initiator type
|
||||
nsCOMPtr<nsITimedChannel> timedChannel(do_QueryInterface(httpChannel));
|
||||
if (timedChannel) {
|
||||
timedChannel->SetInitiatorType(NS_LITERAL_STRING("script"));
|
||||
if (aRequest->IsLinkPreloadScript()) {
|
||||
timedChannel->SetInitiatorType(NS_LITERAL_STRING("link"));
|
||||
} else {
|
||||
timedChannel->SetInitiatorType(NS_LITERAL_STRING("script"));
|
||||
}
|
||||
}
|
||||
|
||||
UniquePtr<mozilla::dom::SRICheckDataVerifier> sriDataVerifier;
|
||||
|
||||
Reference in New Issue
Block a user