From 1f038cd026a9b684545d856c7caebce70a867c6f Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 14 Nov 2024 21:53:59 +0100 Subject: [PATCH] No Issue - stop spewing useless xfo < CSP warning in non-debug builds This warning throws off a lot of users reporting issues. It's not even a proper warning as it's informative at best. Leave it in for debug builds, but stop spewing these common notices in release builds. --- docshell/base/nsDSURIContentListener.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docshell/base/nsDSURIContentListener.cpp b/docshell/base/nsDSURIContentListener.cpp index 7aa3a5d14d..cac2a1786c 100644 --- a/docshell/base/nsDSURIContentListener.cpp +++ b/docshell/base/nsDSURIContentListener.cpp @@ -427,6 +427,7 @@ ShouldIgnoreFrameOptions(nsIChannel* aChannel, nsIPrincipal* aPrincipal) return false; } +#ifdef DEBUG // log warning to console that xfo is ignored because of CSP nsCOMPtr loadInfo = aChannel->GetLoadInfo(); uint64_t innerWindowID = loadInfo ? loadInfo->GetInnerWindowID() : 0; @@ -440,7 +441,7 @@ ShouldIgnoreFrameOptions(nsIChannel* aChannel, nsIPrincipal* aPrincipal) 0, // no columnnumber nsIScriptError::warningFlag, "CSP", innerWindowID); - +#endif return true; }