diff options
Diffstat (limited to 'dom')
-rw-r--r-- | dom/security/nsCSPService.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/security/nsCSPService.cpp b/dom/security/nsCSPService.cpp index f9186b309..4807c9aa4 100644 --- a/dom/security/nsCSPService.cpp +++ b/dom/security/nsCSPService.cpp @@ -288,6 +288,7 @@ CSPService::AsyncOnChannelRedirect(nsIChannel *oldChannel, nsContentUtils::InternalContentPolicyTypeToExternalOrWorker(policyType); int16_t aDecision = nsIContentPolicy::ACCEPT; + nsCOMPtr<nsISupports> requestContext = loadInfo->GetLoadingContext(); // 1) Apply speculative CSP for preloads if (isPreload) { nsCOMPtr<nsIContentSecurityPolicy> preloadCsp; @@ -298,7 +299,7 @@ CSPService::AsyncOnChannelRedirect(nsIChannel *oldChannel, preloadCsp->ShouldLoad(policyType, // load type per nsIContentPolicy (uint32_t) newUri, // nsIURI nullptr, // nsIURI - nullptr, // nsISupports + requestContext, // nsISupports EmptyCString(), // ACString - MIME guess originalUri, // aExtra &aDecision); @@ -317,7 +318,6 @@ CSPService::AsyncOnChannelRedirect(nsIChannel *oldChannel, loadInfo->LoadingPrincipal()->GetCsp(getter_AddRefs(csp)); if (csp) { - nsCOMPtr<nsISupports> requestContext = loadInfo->GetLoadingContext(); // Pass originalURI as aExtra to indicate the redirect csp->ShouldLoad(policyType, // load type per nsIContentPolicy (uint32_t) newUri, // nsIURI |