зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1612470 - Remove Document.hasScriptsBlockedBySandbox and Document.inlineScriptAllowedByCSP. r=bzbarsky
Seems they were only used for the old XBL marquee implementation and have no remaining callers. Differential Revision: https://phabricator.services.mozilla.com/D61338 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
09932803bc
Коммит
2727cf28b8
|
@ -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) ==
|
||||
|
|
|
@ -3566,8 +3566,6 @@ class Document : public nsINode,
|
|||
|
||||
bool HasScriptsBlockedBySandbox();
|
||||
|
||||
bool InlineScriptAllowedByCSP();
|
||||
|
||||
void ReportHasScrollLinkedEffect();
|
||||
bool HasScrollLinkedEffect() const { return mHasScrollLinkedEffect; }
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче