From a843ca75ffce6d000948d20c3603ef5a97196ffa Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 12 Nov 2013 16:43:34 -0800 Subject: [PATCH] Bug 840488 - Remove nsIScriptContext script check in nsScriptLoader. r=bz There are now no longer any consumers that set this to false. --- content/base/src/nsScriptLoader.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp index e8f51510f670..37700d7e4185 100644 --- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -498,28 +498,6 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement) return false; } - // Script evaluation can also be disabled in the current script - // context even though it's enabled in the document. - // XXX - still hard-coded for JS here, even though another language - // may be specified. Should this check be made *after* we examine - // the attributes to locate the script-type? - // For now though, if JS is disabled we assume every language is - // disabled. - // XXX is this different from the mDocument->IsScriptEnabled() call? - nsCOMPtr globalObject = - do_QueryInterface(mDocument->GetWindow()); - if (!globalObject) { - return false; - } - - nsIScriptContext *context = globalObject->GetScriptContext(); - - // If scripts aren't enabled in the current context, there's no - // point in going on. - if (!context || !context->GetScriptsEnabled()) { - return false; - } - JSVersion version = JSVERSION_DEFAULT; // Check the type attribute to determine language and version.