diff --git a/dom/interfaces/security/nsIContentSecurityPolicy.idl b/dom/interfaces/security/nsIContentSecurityPolicy.idl index 447aa2f37366..557b906219f4 100644 --- a/dom/interfaces/security/nsIContentSecurityPolicy.idl +++ b/dom/interfaces/security/nsIContentSecurityPolicy.idl @@ -329,7 +329,6 @@ interface nsIContentSecurityPolicy : nsISerializable short shouldLoad(in nsContentPolicyType aContentType, in nsICSPEventListener aCSPEventListener, in nsIURI aContentLocation, - in nsIURI aRequestOrigin, in nsISupports aContext, in ACString aMimeTypeGuess, in nsIURI aOriginalURIIfRedirect, diff --git a/dom/security/nsCSPContext.cpp b/dom/security/nsCSPContext.cpp index 6cecbc93b9b1..5c586b06ced1 100644 --- a/dom/security/nsCSPContext.cpp +++ b/dom/security/nsCSPContext.cpp @@ -117,8 +117,7 @@ static void BlockedContentSourceToString( NS_IMETHODIMP nsCSPContext::ShouldLoad(nsContentPolicyType aContentType, nsICSPEventListener* aCSPEventListener, - nsIURI* aContentLocation, nsIURI* aRequestOrigin, - nsISupports* aRequestContext, + nsIURI* aContentLocation, nsISupports* aRequestContext, const nsACString& aMimeTypeGuess, nsIURI* aOriginalURIIfRedirect, bool aSendViolationReports, const nsAString& aNonce, diff --git a/dom/security/nsCSPService.cpp b/dom/security/nsCSPService.cpp index aec4c4f13d83..049ca13831f9 100644 --- a/dom/security/nsCSPService.cpp +++ b/dom/security/nsCSPService.cpp @@ -107,11 +107,6 @@ bool subjectToCSP(nsIURI* aURI, nsContentPolicyType aContentType) { uint32_t contentType = aLoadInfo->InternalContentPolicyType(); nsCOMPtr requestContext = aLoadInfo->GetLoadingContext(); - nsCOMPtr requestOrigin; - nsCOMPtr loadingPrincipal = aLoadInfo->LoadingPrincipal(); - if (loadingPrincipal) { - loadingPrincipal->GetURI(getter_AddRefs(requestOrigin)); - } nsCOMPtr cspEventListener; nsresult rv = @@ -149,8 +144,8 @@ bool subjectToCSP(nsIURI* aURI, nsContentPolicyType aContentType) { if (preloadCsp) { // obtain the enforcement decision rv = preloadCsp->ShouldLoad( - contentType, cspEventListener, aContentLocation, requestOrigin, - requestContext, aMimeTypeGuess, + contentType, cspEventListener, aContentLocation, requestContext, + aMimeTypeGuess, nullptr, // no redirect, aOriginal URL is null. aLoadInfo->GetSendCSPViolationEvents(), cspNonce, aDecision); NS_ENSURE_SUCCESS(rv, rv); @@ -175,7 +170,7 @@ bool subjectToCSP(nsIURI* aURI, nsContentPolicyType aContentType) { if (csp) { // obtain the enforcement decision rv = csp->ShouldLoad(contentType, cspEventListener, aContentLocation, - requestOrigin, requestContext, aMimeTypeGuess, + requestContext, aMimeTypeGuess, nullptr, // no redirect, aOriginal URL is null. aLoadInfo->GetSendCSPViolationEvents(), cspNonce, aDecision); @@ -342,7 +337,6 @@ nsresult CSPService::ConsultCSPForRedirect(nsIURI* aOriginalURI, policyType, // load type per nsIContentPolicy (uint32_t) cspEventListener, aNewURI, // nsIURI - nullptr, // nsIURI requestContext, // nsISupports EmptyCString(), // ACString - MIME guess aOriginalURI, // Original nsIURI @@ -366,7 +360,6 @@ nsresult CSPService::ConsultCSPForRedirect(nsIURI* aOriginalURI, csp->ShouldLoad(policyType, // load type per nsIContentPolicy (uint32_t) cspEventListener, aNewURI, // nsIURI - nullptr, // nsIURI requestContext, // nsISupports EmptyCString(), // ACString - MIME guess aOriginalURI, // Original nsIURI