Bug 1499355: EnsurePreloadCSP on SystemPrincipal should return error. r=baku
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Wed, 17 Oct 2018 07:05:55 +0200
changeset 497379 a48759a33738d8b5f4ad4659115e8bbd1e608c31
parent 497378 64ff440bbe37514cc103678d070d399616bfced5
child 497380 84f5f337b0a35c89ccc0dd7ac6735e873a2613f2
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1499355
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;
 }