Don't fold attribute values whose keys weren't folded since it produces invalid output. bug 340042, r=brendan
git-svn-id: svn://10.0.0.236/branches/JS_1_7_ALPHA_BRANCH@199934 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5351,8 +5351,11 @@ FoldXMLConstants(JSContext *cx, JSParseNode *pn, JSTreeContext *tc)
|
||||
/* The parser already rejected end-tags with attributes. */
|
||||
JS_ASSERT(tt != TOK_XMLETAGO || i == 0);
|
||||
switch (pn2->pn_type) {
|
||||
case TOK_XMLNAME:
|
||||
case TOK_XMLATTR:
|
||||
if (!accum)
|
||||
goto cantfold;
|
||||
/* FALL THROUGH */
|
||||
case TOK_XMLNAME:
|
||||
case TOK_XMLSPACE:
|
||||
case TOK_XMLTEXT:
|
||||
case TOK_STRING:
|
||||
|
||||
Reference in New Issue
Block a user