Bug 1499355: EnsurePreloadCSP on SystemPrincipal should return error. r=baku
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Wed, 17 Oct 2018 07:05:55 +0200
changeset 500090 a48759a33738d8b5f4ad4659115e8bbd1e608c31
parent 500089 64ff440bbe37514cc103678d070d399616bfced5
child 500091 84f5f337b0a35c89ccc0dd7ac6735e873a2613f2
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [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;
 }