mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Fix XML folding to skip name nodes with list arity due to embedded {expr} terms (318922, r=mrbkap).
This commit is contained in:
parent
b130104534
commit
2f2cb5e85a
@ -4346,6 +4346,8 @@ FoldXMLConstants(JSContext *cx, JSParseNode *pn, JSTreeContext *tc)
|
||||
case TOK_XMLSPACE:
|
||||
case TOK_XMLTEXT:
|
||||
case TOK_STRING:
|
||||
if (pn->pn_arity == PN_LIST)
|
||||
goto cantfold;
|
||||
str = ATOM_TO_STRING(pn2->pn_atom);
|
||||
break;
|
||||
|
||||
@ -4368,6 +4370,7 @@ FoldXMLConstants(JSContext *cx, JSParseNode *pn, JSTreeContext *tc)
|
||||
return JS_FALSE;
|
||||
break;
|
||||
|
||||
cantfold:
|
||||
default:
|
||||
JS_ASSERT(*pnp == pn1);
|
||||
if ((tt == TOK_XMLSTAGO || tt == TOK_XMLPTAGC) &&
|
||||
|
Loading…
Reference in New Issue
Block a user