Bug 1417494 - Take iframe sandboxing into account for <noscript> parsing. r=bz
MozReview-Commit-ID: GTUCSQq5aDm
This commit is contained in:
@@ -649,16 +649,11 @@ nsHtml5TreeOpExecutor::IsScriptEnabled()
|
||||
// Note that if we have no document or no docshell or no global or whatnot we
|
||||
// want to claim script _is_ enabled, so we don't parse the contents of
|
||||
// <noscript> tags!
|
||||
if (!mDocument || !mDocShell)
|
||||
if (!mDocument || !mDocShell) {
|
||||
return true;
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject = do_QueryInterface(mDocument->GetInnerWindow());
|
||||
// Getting context is tricky if the document hasn't had its
|
||||
// GlobalObject set yet
|
||||
if (!globalObject) {
|
||||
globalObject = mDocShell->GetScriptGlobalObject();
|
||||
}
|
||||
NS_ENSURE_TRUE(globalObject && globalObject->GetGlobalJSObject(), true);
|
||||
return xpc::Scriptability::Get(globalObject->GetGlobalJSObject()).Allowed();
|
||||
|
||||
return mDocument->IsScriptEnabled();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user