Don't fold attribute values whose keys weren't folded since it produces invalid output. bug 340042, r=brendan

This commit is contained in:
mrbkap%gmail.com 2006-06-15 03:17:34 +00:00
Родитель 8de858c0bf
Коммит 1c3b387bd2
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -4617,8 +4617,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: