Bug 788293 - Remove e4x support. r=jorendorff,terrence,evilpie.

Ding dong!  The witch is dead!
This commit is contained in:
Nicholas Nethercote
2013-01-24 21:24:57 -08:00
parent 5a80e875e1
commit 2d2d004475
96 changed files with 259 additions and 13038 deletions

View File

@@ -158,13 +158,6 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, AbstractFramePtr
}
}
ParseNode *pn;
#if JS_HAS_XML_SUPPORT
pn = NULL;
bool onlyXML;
onlyXML = true;
#endif
TokenStream &tokenStream = parser.tokenStream;
bool canHaveDirectives = true;
for (;;) {
@@ -176,7 +169,7 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, AbstractFramePtr
return UnrootedScript(NULL);
}
pn = parser.statement();
ParseNode *pn = parser.statement();
if (!pn)
return UnrootedScript(NULL);
@@ -193,29 +186,12 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, AbstractFramePtr
if (!EmitTree(cx, &bce, pn))
return UnrootedScript(NULL);
#if JS_HAS_XML_SUPPORT
if (!pn->isKind(PNK_SEMI) || !pn->pn_kid || !pn->pn_kid->isXMLItem())
onlyXML = false;
#endif
parser.freeTree(pn);
}
if (!SetSourceMap(cx, tokenStream, ss, script))
return UnrootedScript(NULL);
#if JS_HAS_XML_SUPPORT
/*
* Prevent XML data theft via <script src="http://victim.com/foo.xml">.
* For background, see:
*
* https://bugzilla.mozilla.org/show_bug.cgi?id=336551
*/
if (pn && onlyXML && !callerFrame) {
parser.reportError(NULL, JSMSG_XML_WHOLE_PROGRAM);
return UnrootedScript(NULL);
}
#endif
// It's an error to use |arguments| in a function that has a rest parameter.
if (callerFrame && callerFrame.isFunctionFrame() && callerFrame.fun()->hasRest()) {
HandlePropertyName arguments = cx->names().arguments;