Bug 1499355: EnsurePreloadCSP on SystemPrincipal should return error. r=baku
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Wed, 17 Oct 2018 07:05:55 +0200
changeset 489928 a48759a33738d8b5f4ad4659115e8bbd1e608c31
parent 489927 64ff440bbe37514cc103678d070d399616bfced5
child 489929 84f5f337b0a35c89ccc0dd7ac6735e873a2613f2
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersbaku
bugs1499355
milestone64.0a1
Bug 1499355: EnsurePreloadCSP on SystemPrincipal should return error. r=baku
caps/SystemPrincipal.cpp
--- a/caps/SystemPrincipal.cpp
+++ b/caps/SystemPrincipal.cpp
@@ -97,17 +97,17 @@ SystemPrincipal::GetPreloadCsp(nsIConten
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SystemPrincipal::EnsurePreloadCSP(nsIDocument* aDocument,
                                   nsIContentSecurityPolicy** aPreloadCSP)
 {
   // CSP on a system principal makes no sense
-  return NS_OK;
+  return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 SystemPrincipal::GetDomain(nsIURI** aDomain)
 {
     *aDomain = nullptr;
     return NS_OK;
 }