diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 212179e8b098..306bd0eaa357 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -14397,26 +14397,6 @@ bool Document::HasScriptsBlockedBySandbox() { return mSandboxFlags & SANDBOXED_SCRIPTS; } -bool Document::InlineScriptAllowedByCSP() { - // this function assumes the inline script is parser created - // (e.g., before setting attribute(!) event handlers) - bool allowsInlineScript = true; - if (mCSP) { - nsresult rv = mCSP->GetAllowsInline( - nsIContentPolicy::TYPE_SCRIPT, - EmptyString(), // aNonce - true, // aParserCreated - nullptr, // aTriggeringElement - nullptr, // aCSPEventListener - EmptyString(), // FIXME get script sample (bug 1314567) - 0, // aLineNumber - 0, // aColumnNumber - &allowsInlineScript); - NS_ENSURE_SUCCESS(rv, true); - } - return allowsInlineScript; -} - // Some use-counter sanity-checking. static_assert(size_t(eUseCounter_EndCSSProperties) - size_t(eUseCounter_FirstCSSProperty) == diff --git a/dom/base/Document.h b/dom/base/Document.h index 710f4c53567f..66f9e2785c32 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -3566,8 +3566,6 @@ class Document : public nsINode, bool HasScriptsBlockedBySandbox(); - bool InlineScriptAllowedByCSP(); - void ReportHasScrollLinkedEffect(); bool HasScrollLinkedEffect() const { return mHasScrollLinkedEffect; } diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index 2dbc16208a1d..9035b2aa6c29 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -575,14 +575,6 @@ partial interface Document { void setSuppressedEventListener(EventListener? aListener); }; -// Extension to give chrome and XBL JS the ability to determine whether -// the document is sandboxed without permission to run scripts -// and whether inline scripts are blocked by the document's CSP. -partial interface Document { - [Func="IsChromeOrXBL"] readonly attribute boolean hasScriptsBlockedBySandbox; - [Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP; -}; - // Allows frontend code to query a CSP which needs to be passed for a // new load into docshell. Further, allows to query the CSP in JSON // format for testing purposes.