Fix for 568148 (a=dveditz).
Fix for 568148 (a=dveditz).
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -922,17 +922,17 @@ JSCompiler::compileScript(JSContext *cx,
#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 && (tcflags & TCF_NO_SCRIPT_RVAL)) {
+ if (pn && onlyXML && !callerFrame) {
js_ReportCompileErrorNumber(cx, &jsc.tokenStream, NULL, JSREPORT_ERROR,
JSMSG_XML_WHOLE_PROGRAM);
goto out;
}
#endif
/*
* Global variables and regexps share the index space with locals. Due to