mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
Bug 1761981
This commit is contained in:
parent
50965fb223
commit
28821219dd
1 changed files with 5 additions and 0 deletions
|
|
@ -202,7 +202,12 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
|
||||||
// Sandboxed document check: javascript: URI's are disabled
|
// Sandboxed document check: javascript: URI's are disabled
|
||||||
// in a sandboxed document unless 'allow-scripts' was specified.
|
// in a sandboxed document unless 'allow-scripts' was specified.
|
||||||
nsIDocument* doc = aOriginalInnerWindow->GetExtantDoc();
|
nsIDocument* doc = aOriginalInnerWindow->GetExtantDoc();
|
||||||
|
if (doc && !doc->IsScriptEnabled()) {
|
||||||
|
// Scripts not allowed on the extant doc.
|
||||||
|
return NS_ERROR_DOM_RETVAL_UNDEFINED;
|
||||||
|
}
|
||||||
if (doc && doc->HasScriptsBlockedBySandbox()) {
|
if (doc && doc->HasScriptsBlockedBySandbox()) {
|
||||||
|
// Sandbox policy forbids scripting.
|
||||||
return NS_ERROR_DOM_RETVAL_UNDEFINED;
|
return NS_ERROR_DOM_RETVAL_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue